OSX file paths

OSX file paths are going to be the death of me. What is the OSX (for GetFolderItem) equivalent of the following file path;

"C:/softwaredev/web sites/resources/products.txt" The book I have uses dot’.’ notation as a separator and backslashes.

I would not use an absolute path on OS X if I can avoid it

That said the absolute path to my home directory on OS X is /Users/npalardy

What is it you need / want an absolute path for ?

[quote=189093:@chris benton]OSX file paths are going to be the death of me. What is the OSX (for GetFolderItem) equivalent of the following file path;

"C:/softwaredev/web sites/resources/products.txt"

If you really have created softwaredev at the root of your disk, the path is simply

"/softwaredev/web sites/resources/products.txt"

If it is in your home folder, then the path is

Specialfolder.UserHome.Shellpath+"/softwaredev/web sites/resources/products.txt"

Using literal paths is not cross platform and kind of messy. Admitting you have the exact same file structure on both PC and Mac, better use :

Specialfolder.UserHome.child("softwaredev").child("web sites").child("resources").child("products.txt")

That way you never have to worry about C:\ and other ancillaries.

[quote=189136:@Michel Bujardet]If you really have created softwaredev at the root of your disk, the path is simply

“/softwaredev/web sites/resources/products.txt”[/quote]

Actually, it is

"/softwaredev/web\\ sites/resources/products.txt"

since on Mac, white space must be escaped. Yet another reason not to use platform specific paths, and to prefer Xojo folderitems.

[quote=189144:@Michel Bujardet]Actually, it is

"/softwaredev/web\\ sites/resources/products.txt"

since on Mac, white space must be escaped.[/quote]

Only if you use shell paths. If you use native paths, you do not need to escape the path.

Yes, this is exactly the sort of problem FolderItem aims to solve.