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:
rfm 2011-03-05 17:17:57 +00:00
parent 94c1c1e415
commit 36e1e3c478
3 changed files with 29 additions and 0 deletions

View file

@ -2,6 +2,9 @@
* Source/NSBundle.m: AbsolutePathOfExecutable() attempt to fix this
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>

View file

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

View file

@ -1125,6 +1125,16 @@ static NSStringEncoding defaultEncoding;
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
* handler object which should respond to
@ -1211,6 +1221,16 @@ static NSStringEncoding defaultEncoding;
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
* handler object which should respond to