Overview
Comment: | Rename -[initWith*Path:] to -[initWithPath:]. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
0abd11683034d90f15a479655bb38480 |
User & Date: | js on 2013-08-14 19:28:59 |
Other Links: | manifest | tags |
Context
2013-08-14
| ||
19:30 | Rename +[archiveWithFile:] to +[archiveWithPath:]. check-in: 81f3ac43a6 user: js tags: trunk | |
19:28 | Rename -[initWith*Path:] to -[initWithPath:]. check-in: 0abd116830 user: js tags: trunk | |
19:17 | +[stringWithPath:] -> +[pathWithComponents:]. check-in: 7c4179ab9b user: js tags: trunk | |
Changes
Modified src/OFFile.m from [e0f0d0594a] to [6d3006c532].
︙ | ︙ | |||
249 250 251 252 253 254 255 | #ifndef _WIN32 if (mkdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], DIR_MODE)) #else if (_wmkdir([path UTF16String])) #endif @throw [OFCreateDirectoryFailedException | | | 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | #ifndef _WIN32 if (mkdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE], DIR_MODE)) #else if (_wmkdir([path UTF16String])) #endif @throw [OFCreateDirectoryFailedException exceptionWithPath: path]; } + (void)createDirectoryAtPath: (OFString*)path createParents: (bool)createParents { void *pool; OFArray *pathComponents; |
︙ | ︙ | |||
381 382 383 384 385 386 387 | #ifndef _WIN32 if (chdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wchdir([path UTF16String])) #endif @throw [OFChangeCurrentDirectoryPathFailedException | | | 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | #ifndef _WIN32 if (chdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wchdir([path UTF16String])) #endif @throw [OFChangeCurrentDirectoryPathFailedException exceptionWithPath: path]; } + (off_t)sizeOfFileAtPath: (OFString*)path { if (path == nil) @throw [OFInvalidArgumentException exception]; |
︙ | ︙ | |||
607 608 609 610 611 612 613 | @throw [OFInvalidArgumentException exception]; #ifndef _WIN32 if (remove([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wremove([path UTF16String])) #endif | | < | 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 | @throw [OFInvalidArgumentException exception]; #ifndef _WIN32 if (remove([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wremove([path UTF16String])) #endif @throw [OFRemoveItemFailedException exceptionWithPath: path]; } #ifdef OF_HAVE_LINK + (void)linkItemAtPath: (OFString*)source toPath: (OFString*)destination { void *pool; |
︙ | ︙ |
Modified src/exceptions/OFChangeCurrentDirectoryPathFailedException.h from [bcc7cfa1aa] to [5677a9d1f1].
︙ | ︙ | |||
20 21 22 23 24 25 26 | /*! * @brief An exception indicating that changing the current directory path * failed. */ @interface OFChangeCurrentDirectoryPathFailedException: OFException { | | | | | | | | | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | /*! * @brief An exception indicating that changing the current directory path * failed. */ @interface OFChangeCurrentDirectoryPathFailedException: OFException { OFString *_path; int _errNo; } #ifdef OF_HAVE_PROPERTIES @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif /*! * @brief Creates a new, autoreleased change current directory path failed * exception. * * @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)exceptionWithPath: (OFString*)path; /*! * @brief Initializes an already allocated change directory failed exception. * * @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 */ - 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*)path; /*! * @brief Returns the errno from when the exception was created. * * @return The errno from when the exception was created */ - (int)errNo; @end |
Modified src/exceptions/OFChangeCurrentDirectoryPathFailedException.m from [52bb583ba5] to [a962360020].
︙ | ︙ | |||
20 21 22 23 24 25 26 | #import "OFChangeCurrentDirectoryPathFailedException.h" #import "OFString.h" #import "common.h" @implementation OFChangeCurrentDirectoryPathFailedException | | | < | | | | | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | #import "OFChangeCurrentDirectoryPathFailedException.h" #import "OFString.h" #import "common.h" @implementation OFChangeCurrentDirectoryPathFailedException + (instancetype)exceptionWithPath: (OFString*)path { return [[[self alloc] initWithPath: path] autorelease]; } - init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; } abort(); } - initWithPath: (OFString*)path { self = [super init]; @try { _path = [path copy]; _errNo = GET_ERRNO; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_path release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: @"Failed to change the current directory path to %@! " ERRFMT, _path, ERRPARAM]; } - (OFString*)path { OF_GETTER(_path, false) } - (int)errNo { return _errNo; } @end |
Modified src/exceptions/OFCreateDirectoryFailedException.h from [b8aa2a86f9] to [5df77d0e78].
︙ | ︙ | |||
19 20 21 22 23 24 25 | #import "OFException.h" /*! * @brief An exception indicating a directory couldn't be created. */ @interface OFCreateDirectoryFailedException: OFException { | | | | | | | | | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | #import "OFException.h" /*! * @brief An exception indicating a directory couldn't be created. */ @interface OFCreateDirectoryFailedException: OFException { OFString *_path; int _errNo; } #ifdef OF_HAVE_PROPERTIES @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif /*! * @brief Creates a new, autoreleased create directory failed exception. * * @param path A string with the path of the directory which could not be * created * @return A new, autoreleased create directory failed exception */ + (instancetype)exceptionWithPath: (OFString*)path; /*! * @brief Initializes an already allocated create directory failed exception. * * @param path A string with the path of the directory which could not be * created * @return An initialized create directory failed exception */ - 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*)path; /*! * @brief Returns the errno from when the exception was created. * * @return The errno from when the exception was created */ - (int)errNo; @end |
Modified src/exceptions/OFCreateDirectoryFailedException.m from [31e546c773] to [afa7c99661].
︙ | ︙ | |||
20 21 22 23 24 25 26 | #import "OFCreateDirectoryFailedException.h" #import "OFString.h" #import "common.h" @implementation OFCreateDirectoryFailedException | | | < | | | | < | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | #import "OFCreateDirectoryFailedException.h" #import "OFString.h" #import "common.h" @implementation OFCreateDirectoryFailedException + (instancetype)exceptionWithPath: (OFString*)path { return [[[self alloc] initWithPath: path] autorelease]; } - init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; } abort(); } - initWithPath: (OFString*)path { self = [super init]; @try { _path = [path copy]; _errNo = GET_ERRNO; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_path release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: @"Failed to create directory %@! " ERRFMT, _path, ERRPARAM]; } - (OFString*)path { OF_GETTER(_path, false) } - (int)errNo { return _errNo; } @end |
Modified src/exceptions/OFRemoveItemFailedException.h from [01ad7dd278] to [8b02487093].
︙ | ︙ | |||
19 20 21 22 23 24 25 | #import "OFException.h" /*! * @brief An exception indicating that removing an item failed. */ @interface OFRemoveItemFailedException: OFException { | | | | | | | | | 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | #import "OFException.h" /*! * @brief An exception indicating that removing an item failed. */ @interface OFRemoveItemFailedException: OFException { OFString *_path; int _errNo; } #ifdef OF_HAVE_PROPERTIES @property (readonly, copy, nonatomic) OFString *path; @property (readonly) int errNo; #endif /*! * @brief Creates a new, autoreleased remove failed exception. * * @param path The path of the item which could not be removed * @return A new, autoreleased remove item failed exception */ + (instancetype)exceptionWithPath: (OFString*)path; /*! * @brief Initializes an already allocated remove failed exception. * * @param path The path of the item which could not be removed * @return An initialized remove item failed exception */ - 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*)path; /*! * @brief Returns the errno from when the exception was created. * * @return The errno from when the exception was created */ - (int)errNo; @end |
Modified src/exceptions/OFRemoveItemFailedException.m from [8c04e72357] to [e961218ed3].
︙ | ︙ | |||
20 21 22 23 24 25 26 | #import "OFRemoveItemFailedException.h" #import "OFString.h" #import "common.h" @implementation OFRemoveItemFailedException | | | | | | | | | | 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | #import "OFRemoveItemFailedException.h" #import "OFString.h" #import "common.h" @implementation OFRemoveItemFailedException + (instancetype)exceptionWithPath: (OFString*)path { return [[[self alloc] initWithPath: path] autorelease]; } - init { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; } abort(); } - initWithPath: (OFString*)path { self = [super init]; @try { _path = [path copy]; _errNo = GET_ERRNO; } @catch (id e) { [self release]; @throw e; } return self; } - (void)dealloc { [_path release]; [super dealloc]; } - (OFString*)description { return [OFString stringWithFormat: @"Failed to remove item at path %@! " ERRFMT, _path, ERRPARAM]; } - (OFString*)path { OF_GETTER(_path, false) } - (int)errNo { return _errNo; } @end |