I see that it correctly returns the root directory as a directory when I pass in ‘/’, but can it be used to detect if a file exists? Heck, is there even a file system that is accessible to even get at? Porting some PC code here and wondering if I should just basically assert false on calls like this that assume a file system exists.
Share
Yes, a file system always exists on iOS, but generally the path you want is “/var/mobile/”, as anything outside of ‘mobile’ is out of your domain to read/write to/from.
Generally, however, you are supposed to write files to your sandboxed application’s documents directory, which can be gotten like this: