@@ -19,10 +19,11 @@ #import "OFApplication.h" #import "OFArray.h" #import "OFDataArray.h" #import "OFDictionary.h" #import "OFFile.h" +#import "OFFileManager.h" #import "OFHTTPClient.h" #import "OFHTTPRequest.h" #import "OFHTTPResponse.h" #import "OFOptionsParser.h" #import "OFStdIOStream.h" @@ -540,10 +541,11 @@ return false; } - (void)downloadNextURL { + OFFileManager *fileManager = [OFFileManager defaultManager]; OFString *URLString = nil; OFURL *URL; OFMutableDictionary *clientHeaders; OFHTTPRequest *request; OFHTTPResponse *response; @@ -610,11 +612,12 @@ if (fileName == nil) fileName = [[URL path] lastPathComponent]; if (_continue) { @try { - of_offset_t size = [OFFile sizeOfFileAtPath: fileName]; + of_offset_t size = + [fileManager sizeOfFileAtPath: fileName]; OFString *range; if (size > INTMAX_MAX) @throw [OFOutOfRangeException exception]; @@ -692,11 +695,11 @@ } if ([_outputPath isEqual: @"-"]) _output = of_stdout; else { - if (!_continue && [OFFile fileExistsAtPath: fileName]) { + if (!_continue && [fileManager fileExistsAtPath: fileName]) { [of_stderr writeFormat: @"%@: File %@ already exists!\n", [OFApplication programName], fileName]; _errorCode = 1;