Revision: 5659
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5659&view=rev
Author:   hofman
Date:     2009-09-04 10:26:26 +0000 (Fri, 04 Sep 2009)

Log Message:
-----------
replace some deprecated NSFileManager methods

Modified Paths:
--------------
    trunk/SKDownload.m
    trunk/SKPDFDocument.m

Modified: trunk/SKDownload.m
===================================================================
--- trunk/SKDownload.m  2009-09-04 10:16:33 UTC (rev 5658)
+++ trunk/SKDownload.m  2009-09-04 10:26:26 UTC (rev 5659)
@@ -294,7 +294,7 @@
 - (void)cleanup {
     [self cancel];
     if (filePath)
-        [[NSFileManager defaultManager] removeFileAtPath:[filePath 
stringByDeletingLastPathComponent] handler:nil];
+        [[NSFileManager defaultManager] removeItemAtPath:[filePath 
stringByDeletingLastPathComponent] error:NULL];
 }
 
 - (BOOL)canCancel {
@@ -364,7 +364,7 @@
 - (void)download:(NSURLDownload *)download didFailWithError:(NSError *)error {
     [self setStatus:SKDownloadStatusFailed];
     if (filePath)
-        [[NSFileManager defaultManager] removeFileAtPath:filePath handler:nil];
+        [[NSFileManager defaultManager] removeItemAtPath:filePath error:NULL];
     [self setFilePath:nil];
     if ([delegate respondsToSelector:@selector(downloadDidEnd:)])
         [delegate downloadDidEnd:self];

Modified: trunk/SKPDFDocument.m
===================================================================
--- trunk/SKPDFDocument.m       2009-09-04 10:16:33 UTC (rev 5658)
+++ trunk/SKPDFDocument.m       2009-09-04 10:26:26 UTC (rev 5659)
@@ -368,12 +368,12 @@
                     NSString *tmpPath = [NSTemporaryDirectory() 
stringByAppendingPathComponent:[[NSProcessInfo processInfo] 
globallyUniqueString]];
                     if ([[self notes] count] == 0 || [self writeToURL:[NSURL 
fileURLWithPath:tmpPath] ofType:SKNotesDocumentType error:NULL]) {
                         if (fileExists)
-                            saveNotesOK = [fm removeFileAtPath:notesPath 
handler:nil];
+                            saveNotesOK = [fm removeItemAtPath:notesPath 
error:NULL];
                         if ([[self notes] count]) {
                             if (saveNotesOK)
-                                saveNotesOK = [fm movePath:tmpPath 
toPath:notesPath handler:nil];
+                                saveNotesOK = [fm moveItemAtPath:tmpPath 
toPath:notesPath error:NULL];
                             else
-                                [fm removeFileAtPath:tmpPath handler:nil];
+                                [fm removeItemAtPath:tmpPath error:NULL];
                         }
                     }
                 }
@@ -418,7 +418,7 @@
                 if ([ourExtensions containsObject:[[file pathExtension] 
lowercaseString]] == NO) {
                     if (tmpPath == nil)
                         tmpPath = SKUniqueTemporaryDirectory();
-                    [fm movePath:[path stringByAppendingPathComponent:file] 
toPath:[tmpPath stringByAppendingPathComponent:file] handler:nil];
+                    [fm moveItemAtPath:[path 
stringByAppendingPathComponent:file] toPath:[tmpPath 
stringByAppendingPathComponent:file] error:NULL];
                 }
             }
         }
@@ -428,8 +428,8 @@
         if (tmpPath) {
             fileEnum = [[fm directoryContentsAtPath:tmpPath] objectEnumerator];
             while (file = [fileEnum nextObject])
-                [fm movePath:[tmpPath stringByAppendingPathComponent:file] 
toPath:[path stringByAppendingPathComponent:file] handler:nil];
-            [fm removeFileAtPath:tmpPath handler:nil];
+                [fm moveItemAtPath:[tmpPath 
stringByAppendingPathComponent:file] toPath:[path 
stringByAppendingPathComponent:file] error:NULL];
+            [fm removeItemAtPath:tmpPath error:NULL];
         }
         
         if (success)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to