• 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: Download fileSystem data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Download fileSystem data


  • Subject: Re: Download fileSystem data
  • From: "Stephen J. Butler" <email@hidden>
  • Date: Sat, 30 Nov 2013 04:08:23 -0600

Have you profiled your code to see what calls exactly are taking the most
time? I have a feeling it's these:

    isFilePackageAtPath
    kLSItemInfoIsInvisible
    kFSNodeLockedMask
    kFSCatInfoCreateDate
    kFSCatInfoContentMod
    kFSCatInfoBackupDate
    kFSCatInfoAccessDate

And parsing "ls" output won't get you these (besides, parsing "ls" is a
dirty hack anyway). You probably want to try dropping down to
CFURLEnumerator and asking it to prefetch the desired attributes. Or, if
you're targeting pre-10.6 then FSGetCatalogInfoBulk().



On Sat, Nov 30, 2013 at 3:40 AM, Leonardo <email@hidden> wrote:

> Hi,
> actually I ask a remote machine for
>     contentsOfDirectoryAtPath
> Then for each file I ask for
>     attributesOfItemAtPath
> And check the NSFileType to verify whether the file is
>     NSFileTypeDirectory
>     NSFileTypeRegular
>     NSFileTypeSymbolicLink
> Then I check
>     isFilePackageAtPath
>     kLSItemInfoIsInvisible
>     kFSNodeLockedMask
>     kFSCatInfoCreateDate
>     kFSCatInfoContentMod
>     kFSCatInfoBackupDate
>     kFSCatInfoAccessDate
>
> These queries take a long time on a remote machine.
> Is a faster way to get all of that? I thought to use a Terminal command
> throughan NSTask (e.g. "ls -la" plus other options), but honestly I don't
> know how to filter the query and get the smallest necessary data. Any hint?
>
>
>
> Regards
> -- Leonardo
>
>
> _______________________________________________
>
> 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: Download fileSystem data
      • From: Leonardo <email@hidden>
    • Re: Download fileSystem data
      • From: Ken Thomases <email@hidden>
References: 
 >Download fileSystem data (From: Leonardo <email@hidden>)

  • Prev by Date: Download fileSystem data
  • Next by Date: Re: Fast hash of NSData?
  • Previous by thread: Download fileSystem data
  • Next by thread: Re: Download fileSystem data
  • Index(es):
    • Date
    • Thread