mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
implement setAttributes:ofItemAtPath:error: method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/gnustep_testplant_branch@40428 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1cb6ef8572
commit
bf586eca1b
2 changed files with 10 additions and 0 deletions
|
@ -313,6 +313,8 @@ GS_EXPORT_CLASS
|
|||
- (BOOL) createSymbolicLinkAtPath: (NSString*)path
|
||||
withDestinationPath: (NSString*)destPath
|
||||
error: (NSError**)error;
|
||||
|
||||
- (BOOL) setAttributes:(NSDictionary *)attributes ofItemAtPath:(NSString *)path error:(NSError **)error;
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
@ -685,6 +685,14 @@ static NSStringEncoding defaultEncoding;
|
|||
return allOk;
|
||||
}
|
||||
|
||||
- (BOOL) setAttributes:(NSDictionary *)attributes ofItemAtPath:(NSString *)path error:(NSError **)error
|
||||
{
|
||||
BOOL success = [self changeFileAttributes: attributes atPath: path];
|
||||
if (!success && error != NULL)
|
||||
*error = [NSError _last];
|
||||
return success;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array of path components suitably modified for display
|
||||
* to the end user. This modification may render the returned strings
|
||||
|
|
Loading…
Reference in a new issue