On May 10, 2014, at 15:17 , Charles Srstka wrote:
> Since that's the case Quincey was talking about (greying out files that don't
> exist in the UI), I'd say checkResourceIsReachableAndReturnError: is the
> appropriate API to use. It's certainly more efficient than reading the file
> just to s
On May 10, 2014, at 4:32 PM, Kyle Sluder wrote:
> On May 10, 2014, at 1:27 PM, Charles Srstka wrote:
>
>> On May 10, 2014, at 2:25 PM, Quincey Morris
>> wrote:
>>
>>> -[NSFileManager fileExistsAtPath:] is pretty much legacy API nowadays (and
>>> it’s significant that there’s no URL-based ve
Cordially,
David Blanton
dblan...@britonleap.com
On May 10, 2014, at 2:27 PM, Charles Srstka wrote:
> Sure there is; -[NSURL checkResourceIsReachableAndReturnError:].
From checkResourceIsReachableAndReturnError:
"If your app must perform operations on the file, such as opening it or copyin
On May 10, 2014, at 1:27 PM, Charles Srstka wrote:
>
>> On May 10, 2014, at 2:25 PM, Quincey Morris
>> wrote:
>>
>> -[NSFileManager fileExistsAtPath:] is pretty much legacy API nowadays (and
>> it’s significant that there’s no URL-based version of it).
>
> Sure there is; -[NSURL checkResourc
On May 10, 2014, at 2:25 PM, Quincey Morris
wrote:
> -[NSFileManager fileExistsAtPath:] is pretty much legacy API nowadays (and
> it’s significant that there’s no URL-based version of it).
Sure there is; -[NSURL checkResourceIsReachableAndReturnError:].
Charles
_
On May 10, 2014, at 12:06 , William Squires wrote:
> How can I make sure MyFile.txt exists before trying to read it in?
You can’t, so don’t even try. :)
Because the file system gets modified asynchronously by other processes,
there’s always a potential race condition between checking for exist
On May 10, 2014, at 2:06 PM, William Squires wrote:
> If I have an NSString that contains a filename (and possibly a path, as typed
> on the command-line), how can I check to see if the specified file actually
> exists?
[ code fragment that collects a string representing a file name (not an
a
If I have an NSString that contains a filename (and possibly a path, as typed
on the command-line), how can I check to see if the specified file actually
exists?
i.e.
...
NSString *inFile = [NSString stringWithUTF8String:argv[1]];
...
let's say, and inFile = @"MyFile.txt".
How can I make sure