Re: How do I know if a file is a system link?
Re: How do I know if a file is a system link?
- Subject: Re: How do I know if a file is a system link?
- From: Rosyna <email@hidden>
- Date: Sun, 13 Aug 2006 19:27:17 -0700
Use fileSystemRepresentation, not -UTF8String when working with paths.
Ack, at 8/13/06, Alan Smith said:
Yes That worked fine. I didn't realize it was a C function so I had
tried it in the Terminal and it sad command not found. DUH!
For the record here is my code:
#include <sys/types.h>
#include <sys/stat.h>
struct stat linkstat;
if (lstat([path UTF8String], &linkstat) != -1);
{
if (S_ISLNK(linkstat.st_mode))
{
NSLog(@"it's a link");
}
}
Works great! Thanks Rosyna!
--
Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug
Unsanity: Unsane Tools for Insanely Great People
It's either this, or imagining Phil Schiller in a thong.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden