FolderItems OSX

Maybe I am doing something wrong here.

msgbox str(getfolderitem("/").count)

Returns 0

however, if I select the folder from a dialog, it does actually return the correct answer. Both will report “/” as the folderitem name.

Is this a Mac thing?
Dave

try: msgbox str(getfolderitem("/",FolderItem.PathTypeShell).count)

You might also try pathtypenative as the second parameter in GetFolderItem

You really shouldn’t have much reason to use GetFolderItem in this fashion. You should only be using paths like this when you are exchanging data with a shell, for example, or when reading a path from a data file.

Again, you don’t need to use any of these path options. I imagine you’re using the ‘find .’ command from a shell. You could just as easily write a small algorithm to step the directory tree using FolderItem. I think you’d find this to be pretty darn fast and convenient.

[quote=44525:@dave duke]I am trying to get a folder list of all files on each mount point, I get the error

Passing non-absolute shell paths is not currently supported

when I use shell path.[/quote]

Try using the Volume method to get all the mount points
http://documentation.xojo.com/index.php/Volume