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
ld traverse
SymLinks.
--
Leonardo
> Da: Jens Alfke
> Data: Wed, 17 Mar 2010 09:07:26 -0700
> A: "gMail.com"
> Cc:
> Oggetto: Re: Case sensitive fileName
>
>
> On Mar 17, 2010, at 6:35 AM, gMail.com wrote:
>
>> Now I need to get its real case sensi
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.
>
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
>
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
fileSystemRepresentationWithPath
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.
>
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
On Wed, Mar 17, 2010 at 10:23 AM, Jens Alfke 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 directory is
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' folde
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 ret
Jens gets the prize:
$ cat realpath_test.c
#include
#include
#include
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
$ ./realpath_test REALP
ike PBGetCatInfo using the ioFRefNum...
> Any idea?
>
> Regards
> --
> Leonardo
>
>> Da: Jeremy Pereira
>> Data: Wed, 17 Mar 2010 14:41:05 +0000
>> A: "gMail.com" , Apple Cocoa Develop Develop
>>
>> Cc: Jeremy Pereira
>> Oggett
> 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
anyw
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
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
rep
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], o
2010 14:41:05 +
> A: "gMail.com" , Apple Cocoa Develop Develop
>
> Cc: Jeremy Pereira
> Oggetto: Re: Case sensitive fileName
>
> NSURL* url = [NSURL fileURLWithPath: path];
> NSError* error = nil;
> NSArray* keysIWant = [NSArray arrayWithObject: NS
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 ite
18 matches
Mail list logo