ExamineDirectory Results
Posted: Thu Nov 05, 2020 2:52 pm
I am using ExamineDirectory() to look at the home directory returned by GetHomeDirectory().
All is ok but it returns directories that are not shown when using the OpenFileRequester.
A bit of code to test
I can understand the . and .. but why is 'Library' shown by ExamineDirectory()?
Same goes for other directories beginning with the . character.
Are they something I should hide from a user? trying to select a file?
CD
All is ok but it returns directories that are not shown when using the OpenFileRequester.
A bit of code to test
Code: Select all
Folder.s = GetHomeDirectory()
Debug Folder
;OpenFileRequester("Please choose file to load", Folder, "", 0)
If ExamineDirectory(0, Folder, "")
While NextDirectoryEntry(0)
If DirectoryEntryType(0) = #PB_DirectoryEntry_Directory
;Filters out . .. and directories starting with .
If Left(DirectoryEntryName(0) ,1) <>"."
Debug ""
Debug DirectoryEntryName(0)
Debug DirectoryEntryAttributes(0)
EndIf
EndIf
Wend
FinishDirectory(0)
EndIf
Same goes for other directories beginning with the . character.
Are they something I should hide from a user? trying to select a file?
CD