Re: NSFileManager fileAttributesAtPath confusion
Re: NSFileManager fileAttributesAtPath confusion
- Subject: Re: NSFileManager fileAttributesAtPath confusion
- From: Lorenzo Puleo <email@hidden>
- Date: Fri, 07 Mar 2003 18:02:35 +0100
HI,
so the problem is that the file /tmp/filewithpathinfo
conatins a wrong pathName, that is, this pathName ends with a Carriage
Return. Now I dont' know where did you get this file, or if you save this
file someway.
==============================================================
Then, if you saved earlier this file,
be sure to save the file without the Carriage Return at the end.
==============================================================
If you got this file from some web site, or some other source:
Be sure that all the files you get have a Carriage Return at the end. If so,
you should always delete the last char of this pathName. Easy.
e.g.
wrongPath = @"abcdef";
rightPath = [wrongPath substringToIndex:[wrongPath length] - 1];
... and you will get "abcde"
If, instead, this carriage return is occasional, I don't suggest to delete
the carriage return any time you found it at the end of the string, because
some special Mac file could really have a carriage return at the end of the
fileName. So if you delete it, you could get a wrong path again.
Tell this trouble to the creator of the file.
Bye
--
Lorenzo Puleo
mailto:email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.