@@ -269,23 +269,20 @@ @throw [OFInvalidArgumentException exception]; if ((URLHandler = [OFURLHandler handlerForURL: URL]) == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; - [URLHandler setAttributes: attributes - ofItemAtURL: URL]; + [URLHandler setAttributes: attributes ofItemAtURL: URL]; } #ifdef OF_HAVE_FILES - (void)setAttributes: (of_file_attributes_t)attributes ofItemAtPath: (OFString *)path { void *pool = objc_autoreleasePoolPush(); - [self setAttributes: attributes ofItemAtURL: [OFURL fileURLWithPath: path]]; - objc_autoreleasePoolPop(pool); } #endif - (bool)fileExistsAtURL: (OFURL *)URL @@ -550,12 +547,11 @@ [self changeCurrentDirectoryPath: URL.fileSystemRepresentation]; objc_autoreleasePoolPop(pool); } -- (void)copyItemAtPath: (OFString *)source - toPath: (OFString *)destination +- (void)copyItemAtPath: (OFString *)source toPath: (OFString *)destination { void *pool = objc_autoreleasePoolPush(); [self copyItemAtURL: [OFURL fileURLWithPath: source] toURL: [OFURL fileURLWithPath: destination]]; @@ -562,12 +558,11 @@ objc_autoreleasePoolPop(pool); } #endif -- (void)copyItemAtURL: (OFURL *)source - toURL: (OFURL *)destination +- (void)copyItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool; OFURLHandler *URLHandler; of_file_attributes_t attributes; of_file_type_t type; @@ -579,12 +574,11 @@ if ((URLHandler = [OFURLHandler handlerForURL: source]) == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: source]; - if ([URLHandler copyItemAtURL: source - toURL: destination]) + if ([URLHandler copyItemAtURL: source toURL: destination]) return; if ([self fileExistsAtURL: destination]) @throw [OFCopyItemFailedException exceptionWithSourceURL: source @@ -650,12 +644,11 @@ sourceURL = [source URLByAppendingPathComponent: item]; destinationURL = [destination URLByAppendingPathComponent: item]; - [self copyItemAtURL: sourceURL - toURL: destinationURL]; + [self copyItemAtURL: sourceURL toURL: destinationURL]; objc_autoreleasePoolPop(pool2); } } else if ([type isEqual: of_file_type_regular]) { size_t pageSize = [OFSystemInfo pageSize]; @@ -748,24 +741,20 @@ objc_autoreleasePoolPop(pool); } #ifdef OF_HAVE_FILES -- (void)moveItemAtPath: (OFString *)source - toPath: (OFString *)destination +- (void)moveItemAtPath: (OFString *)source toPath: (OFString *)destination { void *pool = objc_autoreleasePoolPush(); - [self moveItemAtURL: [OFURL fileURLWithPath: source] toURL: [OFURL fileURLWithPath: destination]]; - objc_autoreleasePoolPop(pool); } #endif -- (void)moveItemAtURL: (OFURL *)source - toURL: (OFURL *)destination +- (void)moveItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool; OFURLHandler *URLHandler; if (source == nil || destination == nil) @@ -776,12 +765,11 @@ if ((URLHandler = [OFURLHandler handlerForURL: source]) == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: source]; @try { - if ([URLHandler moveItemAtURL: source - toURL: destination]) + if ([URLHandler moveItemAtURL: source toURL: destination]) return; } @catch (OFMoveItemFailedException *e) { if (e.errNo != EXDEV) @throw e; } @@ -791,12 +779,11 @@ exceptionWithSourceURL: source destinationURL: destination errNo: EEXIST]; @try { - [self copyItemAtURL: source - toURL: destination]; + [self copyItemAtURL: source toURL: destination]; } @catch (OFCopyItemFailedException *e) { [self removeItemAtURL: destination]; @throw [OFMoveItemFailedException exceptionWithSourceURL: source @@ -831,19 +818,16 @@ #ifdef OF_HAVE_FILES - (void)removeItemAtPath: (OFString *)path { void *pool = objc_autoreleasePoolPush(); - [self removeItemAtURL: [OFURL fileURLWithPath: path]]; - objc_autoreleasePoolPop(pool); } #endif -- (void)linkItemAtURL: (OFURL *)source - toURL: (OFURL *)destination +- (void)linkItemAtURL: (OFURL *)source toURL: (OFURL *)destination { void *pool = objc_autoreleasePoolPush(); OFURLHandler *URLHandler; if (source == nil || destination == nil) @@ -856,25 +840,21 @@ if (URLHandler == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: source]; - [URLHandler linkItemAtURL: source - toURL: destination]; + [URLHandler linkItemAtURL: source toURL: destination]; objc_autoreleasePoolPop(pool); } #ifdef OF_FILE_MANAGER_SUPPORTS_LINKS -- (void)linkItemAtPath: (OFString *)source - toPath: (OFString *)destination +- (void)linkItemAtPath: (OFString *)source toPath: (OFString *)destination { void *pool = objc_autoreleasePoolPush(); - [self linkItemAtURL: [OFURL fileURLWithPath: source] toURL: [OFURL fileURLWithPath: destination]]; - objc_autoreleasePoolPop(pool); } #endif - (void)createSymbolicLinkAtURL: (OFURL *)URL @@ -889,25 +869,22 @@ URLHandler = [OFURLHandler handlerForURL: URL]; if (URLHandler == nil) @throw [OFUnsupportedProtocolException exceptionWithURL: URL]; - [URLHandler createSymbolicLinkAtURL: URL - withDestinationPath: target]; + [URLHandler createSymbolicLinkAtURL: URL withDestinationPath: target]; objc_autoreleasePoolPop(pool); } #ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS - (void)createSymbolicLinkAtPath: (OFString *)path withDestinationPath: (OFString *)target { void *pool = objc_autoreleasePoolPush(); - [self createSymbolicLinkAtURL: [OFURL fileURLWithPath: path] withDestinationPath: target]; - objc_autoreleasePoolPop(pool); } #endif @end