use getfolderiten mac os x problem

Hello,
i 'm just working on max OS and i would like to use get fodleritem to “acces” to a folder
but the code as follow doesn’t work in my OSx computer (dont recognize file or folder), it returns nothing
but in window computer everything works fine…

in mac os x i have just changed the path ,for information mesphotos is a folder
What is wrong ?
thks four help

code on mac OS
f= GetFolderItem("/Users/TITI/Desktop/essaititi/photos/img/mesphotos")

f= specialfolder.desktop.child(“essaititi”).child(“photos”).child(“img”).child(“mesphotos”)

If any of the children are missing, f.exists will be false
better check them one by one

if f= specialfolder.desktop.child("essaititi").exists then if f= specialfolder.desktop.child("essaititi").child("photos").exists then etc

Code : f= specialfolder.desktop.child(“essaititi”).child(“photos”).child(“img”).child(“mesphotos”)
work fine by this way
but i dont understand why this code doesnt work on osx
f= GetFolderItem("/Users/TITI/Desktop/essaititi/photos/img/mesphotos"

however, many thanks for your help

[quote=341276:@CONCHE THIERRY]Code : f= specialfolder.desktop.child(“essaititi”).child(“photos”).child(“img”).child(“mesphotos”)
work fine by this way
but i dont understand why this code doesnt work on osx
f= GetFolderItem("/Users/TITI/Desktop/essaititi/photos/img/mesphotos"

however, many thanks for your help[/quote]

Hello,
you can try to add after

f = specialfolder.desktop.child("essaititi").child("photos").child("img").child("mesphotos")

the following code:

MsgBox(f.NativePath)

Compare the text from the Messagebox to the path “/Users/TITI/Desktop/essaititi/photos/img/mesphotos” and see, where they do not match.

[quote=341276:@CONCHE THIERRY]Code : f= specialfolder.desktop.child(“essaititi”).child(“photos”).child(“img”).child(“mesphotos”)
work fine by this way
but i dont understand why this code doesnt work on osx
f= GetFolderItem("/Users/TITI/Desktop/essaititi/photos/img/mesphotos"

however, many thanks for your help[/quote]

You need to include the “pathMode” parameter in GetFolderItem since you are passing a native path into the method.
The default mode of 0 assumes that you are using an absolute path.

f= GetFolderItem("/Users/TITI/Desktop/essaititi/photos/img/mesphotos",FolderItem.PathTypeNative)

http://documentation.xojo.com/index.php/GetFolderItem

Of course! Note to self: Why did I not notice that the pathtype is missing?