Since the file system is case insensitive, why not store the path in upper or
lower case, and convert the path you’re comparing accordingly?
When adding new files, I need to make sure the file is not already in the
database so I compare the paths. This works well except when the case
Ignore my previous post - I hadn’t looked at the thread!
On Jan 7, 2015, at 8:40 AM, Robert Martin robmar...@frontiernet.net wrote:
Since the file system is case insensitive, why not store the path in upper or
lower case, and convert the path you’re comparing accordingly?
When adding
On Jan 6, 2015, at 11:37 PM, Trygve Inda cocoa...@xericdesign.com wrote:
On Jan 6, 2015, at 8:43 PM, Trygve Inda cocoa...@xericdesign.com wrote:
Ultimately what I need to able to do is compare a bookmark to a path.
Why? Or rather, what is the reason underlying that one?
I am keeping a
On 6 Jan 2015, at 16:25, Trygve Inda cocoa...@xericdesign.com wrote:
What then is the best way to do what I need?
I am saving a bookmark to a file and later on I need to display the filename
associated with that Bookmark.
Currently I am getting the path and taking the last component,
On Jan 6, 2015, at 5:05 PM, Trygve Inda cocoa...@xericdesign.com wrote:
If I bookmark a file and the case of any folders or the file itself changes,
then later when I extract the path from the bookmark I want it to reflect
the new case of the path as it now exists.
Use -[NSFileManager
On Jan 6, 2015, at 8:43 PM, Trygve Inda cocoa...@xericdesign.com wrote:
Ultimately what I need to able to do is compare a bookmark to a path.
Why? Or rather, what is the reason underlying that one?
—Jens
___
Cocoa-dev mailing list
What about this (caveat: only works if the file exists):
@interface NSArray (FileNSURL)
- (NSUInteger) indexOfFileNSURL:(NSURL*)aFileURL error:(NSError**)error;
@end
@implementation NSArray (FileNSURL)
- (NSUInteger) indexOfFileNSURL:(NSURL *)aFileURL error:(NSError**)error {
id
On Jan 6, 2015, at 8:43 PM, Trygve Inda cocoa...@xericdesign.com wrote:
Ultimately what I need to able to do is compare a bookmark to a path.
Why? Or rather, what is the reason underlying that one?
I am keeping a database of files that the user adds to a database.
Internally I keep the
On Jan 6, 2015, at 7:40 PM, Kyle Sluder k...@ksluder.com wrote:
On Jan 6, 2015, at 5:05 PM, Trygve Inda cocoa...@xericdesign.com wrote:
If I bookmark a file and the case of any folders or the file itself changes,
then later when I extract the path from the bookmark I want it to reflect
On Jan 6, 2015, at 9:37 PM, Trygve Inda cocoa...@xericdesign.com wrote:
When adding new files, I need to make sure the file is not already in the
database so I compare the paths.
That's not reliable. Different paths does not mean different files, even
without case-folding. There are
On 6 Jan 2015, at 16:25, Trygve Inda cocoa...@xericdesign.com wrote:
What then is the best way to do what I need?
I am saving a bookmark to a file and later on I need to display the filename
associated with that Bookmark.
Currently I am getting the path and taking the last component,
On 5 Jan 2015, at 10:11 AM, Trygve Inda cocoa...@xericdesign.com wrote:
I am using URLByResolvingBookmarkData .
If I make a Bookmark to a file:
/Volumes/Macintosh HD/Documents/MyFile.txt
and later resolve it with URLByResolvingBookmarkData, I get the original path
as expected.
On Jan 6, 2015, at 8:25 AM, Trygve Inda cocoa...@xericdesign.com wrote:
I am saving a bookmark to a file and later on I need to display the filename
associated with that Bookmark.
You may need to canonicalize the path. The docs for -[NSString
stringByStandardizingPath] don't say that it
I am using URLByResolvingBookmarkData .
If I make a Bookmark to a file:
/Volumes/Macintosh HD/Documents/MyFile.txt
and later resolve it with URLByResolvingBookmarkData, I get the original
path as expected.
Then if I change the filename to MYFILE.txt in the Finder and resolve the
bookmark
On 5 Jan 2015, at 10:11 AM, Trygve Inda cocoa...@xericdesign.com wrote:
I am using URLByResolvingBookmarkData .
If I make a Bookmark to a file:
/Volumes/Macintosh HD/Documents/MyFile.txt
and later resolve it with URLByResolvingBookmarkData, I get the original path
as expected.
15 matches
Mail list logo