Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -251,11 +251,11 @@ DIR_MODE)) #else if (_wmkdir([path UTF16String])) #endif @throw [OFCreateDirectoryFailedException - exceptionWithDirectoryPath: path]; + exceptionWithPath: path]; } + (void)createDirectoryAtPath: (OFString*)path createParents: (bool)createParents { @@ -383,11 +383,11 @@ if (chdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wchdir([path UTF16String])) #endif @throw [OFChangeCurrentDirectoryPathFailedException - exceptionWithDirectoryPath: path]; + exceptionWithPath: path]; } + (off_t)sizeOfFileAtPath: (OFString*)path { if (path == nil) @@ -609,12 +609,11 @@ #ifndef _WIN32 if (remove([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wremove([path UTF16String])) #endif - @throw [OFRemoveItemFailedException - exceptionWithItemPath: path]; + @throw [OFRemoveItemFailedException exceptionWithPath: path]; } #ifdef OF_HAVE_LINK + (void)linkItemAtPath: (OFString*)source toPath: (OFString*)destination Index: src/exceptions/OFChangeCurrentDirectoryPathFailedException.h ================================================================== --- src/exceptions/OFChangeCurrentDirectoryPathFailedException.h +++ src/exceptions/OFChangeCurrentDirectoryPathFailedException.h @@ -22,49 +22,49 @@ * @brief An exception indicating that changing the current directory path * failed. */ @interface OFChangeCurrentDirectoryPathFailedException: OFException { - OFString *_directoryPath; + OFString *_path; int _errNo; } #ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *directoryPath; +@property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif /*! * @brief Creates a new, autoreleased change current directory path failed * exception. * - * @param directoryPath The path of the directory to which the current path - * could not be changed + * @param path The path of the directory to which the current path could not be + * changed * @return A new, autoreleased change current directory path failed exception */ -+ (instancetype)exceptionWithDirectoryPath: (OFString*)directoryPath; ++ (instancetype)exceptionWithPath: (OFString*)path; /*! * @brief Initializes an already allocated change directory failed exception. * - * @param directoryPath The path of the directory to which the current path - * could not be changed + * @param path The path of the directory to which the current path could not be + * changed * @return An initialized change current directory path failed exception */ -- initWithDirectoryPath: (OFString*)directoryPath; +- initWithPath: (OFString*)path; /*! * @brief Returns the path of the directory to which the current path could not * be changed. * * @return The path of the directory to which the current path could not be * changed */ -- (OFString*)directoryPath; +- (OFString*)path; /*! * @brief Returns the errno from when the exception was created. * * @return The errno from when the exception was created */ - (int)errNo; @end Index: src/exceptions/OFChangeCurrentDirectoryPathFailedException.m ================================================================== --- src/exceptions/OFChangeCurrentDirectoryPathFailedException.m +++ src/exceptions/OFChangeCurrentDirectoryPathFailedException.m @@ -22,14 +22,13 @@ #import "OFString.h" #import "common.h" @implementation OFChangeCurrentDirectoryPathFailedException -+ (instancetype)exceptionWithDirectoryPath: (OFString*)directoryPath ++ (instancetype)exceptionWithPath: (OFString*)path { - return [[[self alloc] - initWithDirectoryPath: directoryPath] autorelease]; + return [[[self alloc] initWithPath: path] autorelease]; } - init { @try { @@ -40,16 +39,16 @@ } abort(); } -- initWithDirectoryPath: (OFString*)directoryPath +- initWithPath: (OFString*)path { self = [super init]; @try { - _directoryPath = [directoryPath copy]; + _path = [path copy]; _errNo = GET_ERRNO; } @catch (id e) { [self release]; @throw e; } @@ -57,27 +56,27 @@ return self; } - (void)dealloc { - [_directoryPath release]; + [_path release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: @"Failed to change the current directory path to %@! " ERRFMT, - _directoryPath, ERRPARAM]; + _path, ERRPARAM]; } -- (OFString*)directoryPath +- (OFString*)path { - OF_GETTER(_directoryPath, false) + OF_GETTER(_path, false) } - (int)errNo { return _errNo; } @end Index: src/exceptions/OFCreateDirectoryFailedException.h ================================================================== --- src/exceptions/OFCreateDirectoryFailedException.h +++ src/exceptions/OFCreateDirectoryFailedException.h @@ -21,47 +21,47 @@ /*! * @brief An exception indicating a directory couldn't be created. */ @interface OFCreateDirectoryFailedException: OFException { - OFString *_directoryPath; + OFString *_path; int _errNo; } #ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *directoryPath; +@property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif /*! * @brief Creates a new, autoreleased create directory failed exception. * - * @param directoryPath A string with the path of the directory which couldn't - * be created + * @param path A string with the path of the directory which could not be + * created * @return A new, autoreleased create directory failed exception */ -+ (instancetype)exceptionWithDirectoryPath: (OFString*)directoryPath; ++ (instancetype)exceptionWithPath: (OFString*)path; /*! * @brief Initializes an already allocated create directory failed exception. * - * @param directoryPath A string with the path of the directory which couldn't - * be created + * @param path A string with the path of the directory which could not be + * created * @return An initialized create directory failed exception */ -- initWithDirectoryPath: (OFString*)directoryPath; +- initWithPath: (OFString*)path; /*! * @brief Returns a string with the path of the directory which couldn't be * created. * * @return A string with the path of the directory which couldn't be created */ -- (OFString*)directoryPath; +- (OFString*)path; /*! * @brief Returns the errno from when the exception was created. * * @return The errno from when the exception was created */ - (int)errNo; @end Index: src/exceptions/OFCreateDirectoryFailedException.m ================================================================== --- src/exceptions/OFCreateDirectoryFailedException.m +++ src/exceptions/OFCreateDirectoryFailedException.m @@ -22,14 +22,13 @@ #import "OFString.h" #import "common.h" @implementation OFCreateDirectoryFailedException -+ (instancetype)exceptionWithDirectoryPath: (OFString*)directoryPath ++ (instancetype)exceptionWithPath: (OFString*)path { - return [[[self alloc] - initWithDirectoryPath: directoryPath] autorelease]; + return [[[self alloc] initWithPath: path] autorelease]; } - init { @try { @@ -40,16 +39,16 @@ } abort(); } -- initWithDirectoryPath: (OFString*)directoryPath +- initWithPath: (OFString*)path { self = [super init]; @try { - _directoryPath = [directoryPath copy]; + _path = [path copy]; _errNo = GET_ERRNO; } @catch (id e) { [self release]; @throw e; } @@ -57,27 +56,26 @@ return self; } - (void)dealloc { - [_directoryPath release]; + [_path release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: - @"Failed to create directory %@! " ERRFMT, - _directoryPath, ERRPARAM]; + @"Failed to create directory %@! " ERRFMT, _path, ERRPARAM]; } -- (OFString*)directoryPath +- (OFString*)path { - OF_GETTER(_directoryPath, false) + OF_GETTER(_path, false) } - (int)errNo { return _errNo; } @end Index: src/exceptions/OFRemoveItemFailedException.h ================================================================== --- src/exceptions/OFRemoveItemFailedException.h +++ src/exceptions/OFRemoveItemFailedException.h @@ -21,44 +21,44 @@ /*! * @brief An exception indicating that removing an item failed. */ @interface OFRemoveItemFailedException: OFException { - OFString *_itemPath; + OFString *_path; int _errNo; } #ifdef OF_HAVE_PROPERTIES -@property (readonly, copy, nonatomic) OFString *itemPath; +@property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif /*! * @brief Creates a new, autoreleased remove failed exception. * - * @param itemPath The path of the item which could not be removed + * @param path The path of the item which could not be removed * @return A new, autoreleased remove item failed exception */ -+ (instancetype)exceptionWithItemPath: (OFString*)itemPath; ++ (instancetype)exceptionWithPath: (OFString*)path; /*! * @brief Initializes an already allocated remove failed exception. * - * @param itemPath The path of the item which could not be removed + * @param path The path of the item which could not be removed * @return An initialized remove item failed exception */ -- initWithItemPath: (OFString*)itemPath; +- initWithPath: (OFString*)path; /*! * @brief Returns the path of the item which could not be removed. * * @return The path of the item which could not be removed */ -- (OFString*)itemPath; +- (OFString*)path; /*! * @brief Returns the errno from when the exception was created. * * @return The errno from when the exception was created */ - (int)errNo; @end Index: src/exceptions/OFRemoveItemFailedException.m ================================================================== --- src/exceptions/OFRemoveItemFailedException.m +++ src/exceptions/OFRemoveItemFailedException.m @@ -22,13 +22,13 @@ #import "OFString.h" #import "common.h" @implementation OFRemoveItemFailedException -+ (instancetype)exceptionWithItemPath: (OFString*)itemPath ++ (instancetype)exceptionWithPath: (OFString*)path { - return [[[self alloc] initWithItemPath: itemPath] autorelease]; + return [[[self alloc] initWithPath: path] autorelease]; } - init { @try { @@ -39,16 +39,16 @@ } abort(); } -- initWithItemPath: (OFString*)itemPath +- initWithPath: (OFString*)path { self = [super init]; @try { - _itemPath = [itemPath copy]; + _path = [path copy]; _errNo = GET_ERRNO; } @catch (id e) { [self release]; @throw e; } @@ -56,26 +56,26 @@ return self; } - (void)dealloc { - [_itemPath release]; + [_path release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: - @"Failed to remove item at path %@! " ERRFMT, _itemPath, ERRPARAM]; + @"Failed to remove item at path %@! " ERRFMT, _path, ERRPARAM]; } -- (OFString*)itemPath +- (OFString*)path { - OF_GETTER(_itemPath, false) + OF_GETTER(_path, false) } - (int)errNo { return _errNo; } @end