rudimentary implementation fo two new methods

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32463 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2011-03-05 17:17:57 +00:00
parent 62a00dd0a8
commit 76e7141e1b
3 changed files with 29 additions and 0 deletions

View file

@ -2,6 +2,9 @@
* Source/NSBundle.m: AbsolutePathOfExecutable() attempt to fix this * Source/NSBundle.m: AbsolutePathOfExecutable() attempt to fix this
to return a fully standardised path without symbolic links. to return a fully standardised path without symbolic links.
* Source/NSFileManager.m:
* Headers/Foundation/NSFileManager.h:
Rudimentary implementation of a couple of new methods.
2011-03-05 Tom Davie <beelsebob2> 2011-03-05 Tom Davie <beelsebob2>

View file

@ -219,6 +219,12 @@ typedef uint32_t OSType;
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST) #if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
- (NSDictionary *) attributesOfItemAtPath: (NSString*)path - (NSDictionary *) attributesOfItemAtPath: (NSString*)path
error: (NSError**)error; error: (NSError**)error;
- (BOOL) copyItemAtPath: (NSString*)src
toPath: (NSString*)dst
error: (NSError**)error;
- (BOOL) moveItemAtPath: (NSString*)src
toPath: (NSString*)dst
error: (NSError**)error;
#endif #endif
- (BOOL) changeCurrentDirectoryPath: (NSString*)path; - (BOOL) changeCurrentDirectoryPath: (NSString*)path;

View file

@ -1125,6 +1125,16 @@ static NSStringEncoding defaultEncoding;
return YES; return YES;
} }
- (BOOL) copyItemAtPath: (NSString*)src
toPath: (NSString*)dst
error: (NSError**)error
{
BOOL result;
result = [self copyPath: src toPath: dst handler: nil];
return result;
}
/** /**
* Moves the file or directory at source to destination, using a * Moves the file or directory at source to destination, using a
* handler object which should respond to * handler object which should respond to
@ -1211,6 +1221,16 @@ static NSStringEncoding defaultEncoding;
return NO; return NO;
} }
- (BOOL) moveItemAtPath: (NSString*)src
toPath: (NSString*)dst
error: (NSError**)error
{
BOOL result;
result = [self movePath: src toPath: dst handler: nil];
return result;
}
/** /**
* <p>Links the file or directory at source to destination, using a * <p>Links the file or directory at source to destination, using a
* handler object which should respond to * handler object which should respond to