Re: Download fileSystem data
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