diff --git a/Headers/Foundation/NSFileManager.h b/Headers/Foundation/NSFileManager.h index 1c269b247..42811fc1d 100644 --- a/Headers/Foundation/NSFileManager.h +++ b/Headers/Foundation/NSFileManager.h @@ -210,6 +210,11 @@ typedef uint32_t OSType; + (NSFileManager*) defaultManager; +#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) +- (NSDictionary *) attributesOfItemAtPath: (NSString*)path + error: (NSError**)error; +#endif + - (BOOL) changeCurrentDirectoryPath: (NSString*)path; - (BOOL) changeFileAttributes: (NSDictionary*)attributes atPath: (NSString*)path; @@ -249,8 +254,6 @@ typedef uint32_t OSType; - (NSDictionary*) fileAttributesAtPath: (NSString*)path traverseLink: (BOOL)flag; -- (NSDictionary *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error; - - (BOOL) fileExistsAtPath: (NSString*)path; - (BOOL) fileExistsAtPath: (NSString*)path isDirectory: (BOOL*)isDirectory; - (NSDictionary*) fileSystemAttributesAtPath: (NSString*)path; diff --git a/Source/NSFileManager.m b/Source/NSFileManager.m index 1ecd1c44e..ad8eed65a 100644 --- a/Source/NSFileManager.m +++ b/Source/NSFileManager.m @@ -1820,17 +1820,18 @@ static NSStringEncoding defaultEncoding; * [NSDictionary-fileSystemFileNumber] * */ -- (NSDictionary *)attributesOfItemAtPath:(NSString *)path error:(NSError **)error +- (NSDictionary*) attributesOfItemAtPath: (NSString*)path + error: (NSError**)error { NSDictionary *d; d = [GSAttrDictionaryClass attributesAt: - [self fileSystemRepresentationWithPath: path] traverseLink: NO]; + [self fileSystemRepresentationWithPath: path] traverseLink: NO]; if (error != NULL) - { - *error = [NSError _last]; - } + { + *error = [NSError _last]; + } return d; }