.
--
Leonardo
Da: Jens Alfke j...@mooseyard.com
Data: Wed, 17 Mar 2010 09:07:26 -0700
A: gMail.com mac.iphone@gmail.com
Cc: cocoa-dev@lists.apple.com
Oggetto: Re: Case sensitive fileName
On Mar 17, 2010, at 6:35 AM, gMail.com wrote:
Now I need to get its real case sensitive file
On Mar 29, 2010, at 6:24 AM, gMail.com wrote:
I have finally realized that the API realpath traverses the sym
links.
And I need to not to traverse them. Any other idea? Thanks.
This is turning into a filesystem API question … you might get more
ideas if you post on the darwin-userlevel
Hi, I have a file path
/Folder/filename.txt
The API fileExistsAtPath says that it exists.
Now I need to get its real case sensitive file name, which is indeed e.g.
FileName.txt
How can I get it in a fast way? I thought by its inode, but I can't really
know how to do that.
I know I can
Mar 2010 14:41:05 +
A: gMail.com mac.iphone@gmail.com, Apple Cocoa Develop Develop
cocoa-dev@lists.apple.com
Cc: Jeremy Pereira jeremyp...@me.com
Oggetto: Re: Case sensitive fileName
NSURL* url = [NSURL fileURLWithPath: path];
NSError* error = nil;
NSArray* keysIWant = [NSArray
On Mar 17, 2010, at 6:35 AM, gMail.com wrote:
Now I need to get its real case sensitive file name, which is indeed e.g.
FileName.txt
How can I get it in a fast way? I thought by its inode, but I can't really
know how to do that.
Have you tried -[NSString stringByStandardizingPath], or the
Does readdir work on Mac OS X? I don't have a Mac handy right now to
check, but it should work because so many *NIX programs build on OS X
right out of the box.
More or less what you do is call opendir on a directory, then
rewinddir to set your iterator to the beginning of the directory, then
I don't think that the OP wanted to iterate through the entire directory
though...
On 17 Mar 2010, at 16:15, Don Quixote de la Mancha wrote:
Does readdir work on Mac OS X? I don't have a Mac handy right now to
check, but it should work because so many *NIX programs build on OS X
right out
I don't think that the OP wanted to iterate through the entire directory
though...
Maybe so, but I don't think there would be any real disadvantage to
doing so. I'm pretty sure that just about any API that can retrieve a
filename from a directory will iterate through the whole directory
: Jeremy Pereira jeremyp...@me.com
Data: Wed, 17 Mar 2010 14:41:05 +
A: gMail.com mac.iphone@gmail.com, Apple Cocoa Develop Develop
cocoa-dev@lists.apple.com
Cc: Jeremy Pereira jeremyp...@me.com
Oggetto: Re: Case sensitive fileName
NSURL* url = [NSURL fileURLWithPath: path];
NSError
Jens gets the prize:
$ cat realpath_test.c
#include stdio.h
#include sys/param.h
#include stdlib.h
int main(int argc, char *argv[]) {
char resolved_name[PATH_MAX];
realpath(argv[1], resolved_name);
printf(%s\n, resolved_name);
}
$ gcc realpath_test.c -o realpath_test
On Mar 17, 2010, at 9:28 AM, Don Quixote de la Mancha wrote:
I don't think that the OP wanted to iterate through the entire
directory though...
Maybe so, but I don't think there would be any real disadvantage to
doing so.
Performance.
I'm pretty sure that just about any API that can
Am 17.03.2010 um 17:46 Uhr schrieb Kevin Wojniak:
NSLog(@displayNameAtPath: %@, [[NSFileManager defaultManager]
displayNameAtPath:path]);
Note that -displayNameAtPath: will give you the localized name if one
should exist.
(For example you'll get 'Programme' for the 'Applications' folder
On Wed, Mar 17, 2010 at 10:23 AM, Jens Alfke j...@mooseyard.com wrote:
I'm pretty sure that just about any API that can retrieve a
filename from a directory will iterate through the whole directory
anyway.
No; retrieving a file by name is just a B+tree lookup in HFS. Walking
through the
On 17 Mar 2010, at 13:35, gMail.com wrote:
Hi, I have a file path
/Folder/filename.txt
The API fileExistsAtPath says that it exists.
Now I need to get its real case sensitive file name, which is indeed e.g.
FileName.txt
How can I get it in a fast way? I thought by its inode, but I can't
On 17 Mar 2010, at 16:07, Jens Alfke wrote:
On Mar 17, 2010, at 6:35 AM, gMail.com wrote:
Now I need to get its real case sensitive file name, which is indeed e.g.
FileName.txt
How can I get it in a fast way? I thought by its inode, but I can't really
know how to do that.
Have you
Thank you! I have used realpath, and it worked as like a charm!
Here's my code. One question only: is the NSUTF8StringEncoding correct?
- (NSString*)CaseSensitiveFilePath:(NSString*)filePath
{
const char*cFilePath = [mManager
On Mar 17, 2010, at 3:24 PM, gMail.com wrote:
Thank you! I have used realpath, and it worked as like a charm!
Here's my code. One question only: is the NSUTF8StringEncoding correct?
- (NSString*)CaseSensitiveFilePath:(NSString*)filePath
{
const char*cFilePath = [mManager
On Mar 17, 2010, at 12:35 PM, Andreas Mayer wrote:
Am 17.03.2010 um 17:46 Uhr schrieb Kevin Wojniak:
NSLog(@displayNameAtPath: %@, [[NSFileManager defaultManager]
displayNameAtPath:path]);
Note that -displayNameAtPath: will give you the localized name if one should
exist.
(For
18 matches
Mail list logo