• 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: Problem with NSFileManger directoryContentsAtPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with NSFileManger directoryContentsAtPath


  • Subject: Re: Problem with NSFileManger directoryContentsAtPath
  • From: "Hamish Allan" <email@hidden>
  • Date: Fri, 16 May 2008 15:04:40 +0100

On Fri, May 16, 2008 at 6:02 AM, JanakiRam <email@hidden> wrote:
> When i perform ls command it shows file name as "Icon?". When i perform cp
> command & tab it shows the file name as "Icon^M".
> Why Terminal does show different  names for the same file.

Because the filename contains a non-printing character
(http://en.wikipedia.org/wiki/Control_character). "bash" (which is
what is performing the tab completion) and "ls" have different ways of
denoting non-printing characters. NSLog is treating it as if there is
an implicit line feed.

> When i see it in
> Finder it does show as "Icon".

This would suggest that the Finder has been designed not to indicate
the presence of non-printing characters.

> Please advise. Thanks in Advance.

Advise you about what, though? You say that "for some files it is
failing", but the code you included seems to be working perfectly.

Hamish
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Problem with NSFileManger directoryContentsAtPath (From: JanakiRam <email@hidden>)
 >Re: Problem with NSFileManger directoryContentsAtPath (From: Jean-Daniel Dupas <email@hidden>)
 >Re: Problem with NSFileManger directoryContentsAtPath (From: JanakiRam <email@hidden>)

  • Prev by Date: Set view in bottom right corner of NSTableView
  • Next by Date: RE: Guidance for Cocoa's steep learning curve
  • Previous by thread: Re: Problem with NSFileManger directoryContentsAtPath
  • Next by thread: Re: Problem with NSFileManger directoryContentsAtPath
  • Index(es):
    • Date
    • Thread