Files and Folders question

Monkey Targets Forums/Desktop/Files and Folders question

chrisc2977(Posted 2012) [#1]
When using LoarDir() Is there any way to identify whether the content is a file or a folder?
Currently I use if it contains a "." but that doesnt always work (i.e. monkeygame.data folder)

Cheers


AdamRedwoods(Posted 2012) [#2]
assuming monkey.os module:
If FileType( path$ ) = FILETYPE_NONE
   Print "no file or directory"
ElseIf FileType( path$ ) = FILETYPE_FILE
   Print "A file exists"
ElseIf FileType( path$ ) = FILETYPE_DIR
   Print "A folder exists"
Endif



chrisc2977(Posted 2012) [#3]
Thank you soooo much :)


chrisc2977(Posted 2012) [#4]
Also is there any way to get the drives available (C:, D: etc, Mac Hdd etc)?