Created
July 28, 2011 05:55
-
-
Save skahack/1111045 to your computer and use it in GitHub Desktop.
NSFileVersionTest.m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// clang -o nsFileVersionTest nsFileVersionTest.m -lobjc -framework Cococa | |
#import <Cocoa/Cocoa.h> | |
void applicationMain() | |
{ | |
NSURL *url = [NSURL fileURLWithPath:@"/Users/SKAhack/Desktop/Test.txt" isDirectory:NO]; | |
NSArray *versions = [NSFileVersion otherVersionsOfItemAtURL:url]; | |
for (NSFileVersion *f in versions) { | |
NSLog(@"URL : %@", f.URL); | |
NSLog(@"localizedName : %@", f.localizedName); | |
NSLog(@"localizedNameOfSavingComputer : %@", f.localizedNameOfSavingComputer); | |
NSLog(@"modificationDate : %@", f.modificationDate); | |
} | |
} | |
int main(int argc, char *argv[]) | |
{ | |
id pool = [[NSAutoreleasePool alloc] init]; | |
applicationMain(); | |
[pool release]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment