FileType for long path names
BlitzMax Forums/BlitzMax Programming/FileType for long path names
| ||
The FileType command is limited to pathnames less than 256 characters in length. This bit of code will use the windows API to get the filetype no matter the length of the pathname. It works with drive letters or UNC names. It returns 0 for doesn't exist, 1 for file and 2 for folder, just like the normal FileType command. The debug line at the bottom was just for my testing purposes. Youwill want a pathname that is valid on your computer, or you will get a 0 back. :) |