• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSFileManager fileAttributesAtPath confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: NSFileManager fileAttributesAtPath confusion (From: Chris Long <email@hidden>)

  • Prev by Date: Re: NSTableView scrollbar not updating
  • Next by Date: Re: Cocoa/Java - NSNotification not received.
  • Previous by thread: Re: NSFileManager fileAttributesAtPath confusion
  • Next by thread: String encoding problem
  • Index(es):
    • Date
    • Thread