mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Add new symbolic link method to NSFileManager.
This commit is contained in:
parent
4b56172ac8
commit
97f9a02308
3 changed files with 35 additions and 1 deletions
|
@ -361,7 +361,7 @@ static NSStringEncoding defaultEncoding;
|
|||
return _delegate;
|
||||
}
|
||||
|
||||
- (void) setDelegate: (NSFileManager *)delegate {
|
||||
- (void) setDelegate: (id<NSFileManagerDelegate>)delegate {
|
||||
_delegate = delegate;
|
||||
}
|
||||
|
||||
|
@ -1586,6 +1586,26 @@ static NSStringEncoding defaultEncoding;
|
|||
return [self removeItemAtPath: [url path] error: error];
|
||||
}
|
||||
|
||||
- (BOOL) createSymbolicLinkAtPath: (NSString*)path
|
||||
withDestinationPath: (NSString*)destPath
|
||||
error: (NSError**)error
|
||||
{
|
||||
BOOL result;
|
||||
|
||||
DESTROY(_lastError);
|
||||
result = [self createSymbolicLinkAtPath: path pathContent: destPath];
|
||||
|
||||
if (error != NULL)
|
||||
{
|
||||
if (NO == result)
|
||||
{
|
||||
*error = [self _errorFrom: path to: destPath];
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
- (BOOL) fileExistsAtPath: (NSString*)path
|
||||
{
|
||||
return [self fileExistsAtPath: path isDirectory: 0];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue