• 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: JanakiRam <email@hidden>
  • Date: Fri, 16 May 2008 19:58:09 +0530

When i give this filename as part of rsync source file ( using --files-from
) , rsync is treating this filename as 2 different file names , because
rsync expects each filen name separated by \r.
Hence my rsync command is failing....

JanakiRam.


On Fri, May 16, 2008 at 5:42 PM, Jean-Daniel Dupas <email@hidden>
wrote:

> Yes, they all display it in a different way, and why is it a problem ?
> What does it prevent you to do?
>
>
>
> Le 16 mai 08 à 07:02, JanakiRam a écrit :
>
> 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. When i see it in
> Finder it does show as "Icon".
>
> Please advise. Thanks in Advance.
>
> JanakiRam
>
> On Thu, May 15, 2008 at 4:34 PM, Jean-Daniel Dupas <email@hidden>
> wrote:
>
>> "Icon\r" is an invisible file that contains a custom directory icon.
>>
>> What make you think this file is handle in different way ?
>> The terminal displays '\r' as ^M but it's not a problem. Isn't it?
>>
>>
>> Le 15 mai 08 à 12:17, JanakiRam a écrit :
>>
>>  Hi All,
>>> I'm facing an issue with NSFileManger directoryContentsAtPath API. This
>>> seems to be an wried issue. But its very important for me to fix. Please
>>> help me.
>>>
>>> My application is trying to enumerate  the folders in inside a Mac
>>> using NSFileManager  API. But for some files its failing.
>>>
>>> It looks like the file name ( inside bundle ) is interpreted by Finder
>>> and
>>> Terminal in a different ways. Can any one please suggest me a way to
>>> resolve
>>> this issue.
>>>
>>> Thanks in Advance
>>>
>>> *Cocoa Code for your reference.*
>>>
>>> NSFileManager *defaultManager = [NSFileManager defaultManager];
>>> NSArray *filePath = [defaultManager directoryContentsAtPath:
>>> @"/Users/janakiram/Downloads/Folder.tiff"];
>>> int i , count = [filePath count];
>>>
>>> for ( i = 0 ; i < count ; i++ ) {
>>> NSLog(@" filepath  is (%@)",[filePath objectAtIndex:i]);
>>>
>>> }
>>>
>>> *Output:*
>>>
>>> [Session started at 2008-05-15 15:34:38 +0530.]
>>> 2008-05-15 15:34:38.951 FileEnumerator[4094:10b]  filepath  is (Icon
>>> )
>>>
>>> FileEnumerator has exited with status 0.
>>>
>>> *Terminal View of Folder :*
>>>
>>> Janakirams-iMac-G5:~ janakiram$ cd /Users/janakiram/Downloads/Folder.tiff
>>>
>>> Janakirams-iMac-G5:Folder.tiff janakiram$ ls -la
>>> total 112
>>> drwxr-xr-x@  3 janakiram  staff   102 May 15 15:36 .
>>> drwx------+ 92 janakiram  staff  3128 May 15 15:17 ..
>>> -rwxr-xr-x@  1 janakiram  staff     0 Aug  8  2006 Icon?
>>>
>>> Janakirams-iMac-G5:Folder.tiff janakiram$ cp -R Icon^M
>>>
>>>
>>>
>>>
>>> JanakiRam.
>>> _______________________________________________
>>>
>>> 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
>>>
>>>
>>
>
>
_______________________________________________

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

  • Follow-Ups:
    • Re: Problem with NSFileManger directoryContentsAtPath
      • From: Michael Vannorsdel <email@hidden>
    • Re: Problem with NSFileManger directoryContentsAtPath
      • From: Jens Alfke <email@hidden>
    • Re: Problem with NSFileManger directoryContentsAtPath
      • From: "Hamish Allan" <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>)
 >Re: Problem with NSFileManger directoryContentsAtPath (From: Jean-Daniel Dupas <email@hidden>)

  • Prev by Date: Re: Guidance for Cocoa's steep learning curve
  • 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