@@ -67,12 +67,12 @@ #import "OFLinkFailedException.h" #import "OFLockFailedException.h" #import "OFOpenFileFailedException.h" #import "OFOutOfMemoryException.h" #import "OFReadFailedException.h" -#import "OFRemoveFailedException.h" -#import "OFRenameFailedException.h" +#import "OFRemoveItemFailedException.h" +#import "OFRenameItemFailedException.h" #import "OFSeekFailedException.h" #import "OFUnlockFailedException.h" #import "OFWriteFailedException.h" #import "autorelease.h" @@ -241,11 +241,11 @@ DIR_MODE)) #else if (_wmkdir([path UTF16String])) #endif @throw [OFCreateDirectoryFailedException - exceptionWithPath: path]; + exceptionWithDirectoryPath: path]; } + (void)createDirectoryAtPath: (OFString*)path createParents: (bool)createParents { @@ -362,11 +362,11 @@ if (chdir([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wchdir([path UTF16String])) #endif @throw [OFChangeCurrentDirectoryPathFailedException - exceptionWithPath: path]; + exceptionWithDirectoryPath: path]; } + (off_t)sizeOfFileAtPath: (OFString*)path { #ifndef _WIN32 @@ -552,11 +552,11 @@ if (rename([source cStringWithEncoding: OF_STRING_ENCODING_NATIVE], [destination cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wrename([source UTF16String], [destination UTF16String])) #endif - @throw [OFRenameFailedException + @throw [OFRenameItemFailedException exceptionWithSourcePath: source destinationPath: destination]; objc_autoreleasePoolPop(pool); } @@ -566,11 +566,12 @@ #ifndef _WIN32 if (remove([path cStringWithEncoding: OF_STRING_ENCODING_NATIVE])) #else if (_wremove([path UTF16String])) #endif - @throw [OFRemoveFailedException exceptionWithPath: path]; + @throw [OFRemoveItemFailedException + exceptionWithItemPath: path]; } #ifdef OF_HAVE_LINK + (void)linkItemAtPath: (OFString*)source toPath: (OFString*)destination