On Fri, Jul 8, 2011 at 1:53 AM, Rick C. <rickcort...@gmail.com> wrote:
> Well I am using iconForFile if I remember correctly.  Since I'm on the iPhone 
> let me double-check everything you all have suggested and I'll post back. 
> Thanks again!

Didn't know you were on iOS. But yes, I would expect iconForFile: to
modify the atime.

> On Jul 8, 2011, at 1:52 PM, "Stephen J. Butler" <stephen.but...@gmail.com> 
> wrote:
>
>> On Fri, Jul 8, 2011 at 12:31 AM, Scott Ribe <scott_r...@elevated-dev.com> 
>> wrote:
>>> On Jul 7, 2011, at 11:19 PM, Rick C. wrote:
>>>
>>>> One more note, seems in terminal "stat aFile" works so I suppose I could 
>>>> use nstask to do this as well?
>>>
>>> It does seem odd that the two would produce different results...
>>
>> They don't, at least not in my test. For all six loops of a given file
>> this code gives the same output:
>>
>>
>> #include <sys/stat.h>
>> #include <stdio.h>
>> #include <unistd.h>
>>
>> #import <Foundation/Foundation.h>
>>
>> int main( int argc, char **argv )
>> {
>>    struct stat st;
>>    int i;
>>
>>    for (i = 0; i < 3; ++i)
>>    {
>>        if (stat( argv[1], &st ) != 0)
>>            return 1;
>>        printf( "%s #%d atime = %d\n", argv[1], i, st.st_atimespec.tv_sec );
>>        sleep( 10 );
>>    }
>>
>>    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
>>    NSString *file = [NSString stringWithUTF8String:argv[1]];
>>
>>    for (i = 0; i < 3; ++i)
>>    {
>>        if (stat( [file fileSystemRepresentation], &st ) != 0)
>>            return 1;
>>        printf( "%s #%d atime = %d\n", argv[1], i, st.st_atimespec.tv_sec );
>>        sleep( 10 );
>>    }
>>
>>    [pool drain];
>>
>>    return 0;
>> }
>>
>> I was testing the Obj-C version just in case fileSystemRepresentation
>> was in some odd way changing the atime.
>>
>> I think something else in your code is going wrong. Are you asking
>> Launch Services for an icon or anything like that?
>> _______________________________________________
>>
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>>
>> 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:
>> http://lists.apple.com/mailman/options/cocoa-dev/rickcorteza%40gmail.com
>>
>> This email sent to rickcort...@gmail.com
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to