|
@@ -1284,19 +1284,15 @@
|
|
|
|
|
|
+ (void)moveFileAtPath:(NSString *)atPath toPath:(NSString *)toPath
|
|
|
{
|
|
|
- if ([[NSFileManager defaultManager] fileExistsAtPath:atPath]) {
|
|
|
- [[NSFileManager defaultManager] removeItemAtPath:toPath error:nil];
|
|
|
- [[NSFileManager defaultManager] copyItemAtPath:atPath toPath:toPath error:nil];
|
|
|
- [[NSFileManager defaultManager] removeItemAtPath:atPath error:nil];
|
|
|
- }
|
|
|
+ [[NSFileManager defaultManager] removeItemAtPath:toPath error:nil];
|
|
|
+ [[NSFileManager defaultManager] copyItemAtPath:atPath toPath:toPath error:nil];
|
|
|
+ [[NSFileManager defaultManager] removeItemAtPath:atPath error:nil];
|
|
|
}
|
|
|
|
|
|
+ (void)copyFileAtPath:(NSString *)atPath toPath:(NSString *)toPath
|
|
|
{
|
|
|
- if ([[NSFileManager defaultManager] fileExistsAtPath:atPath]) {
|
|
|
- [[NSFileManager defaultManager] removeItemAtPath:toPath error:nil];
|
|
|
- [[NSFileManager defaultManager] copyItemAtPath:atPath toPath:toPath error:nil];
|
|
|
- }
|
|
|
+ [[NSFileManager defaultManager] removeItemAtPath:toPath error:nil];
|
|
|
+ [[NSFileManager defaultManager] copyItemAtPath:atPath toPath:toPath error:nil];
|
|
|
}
|
|
|
|
|
|
+ (void)removeFileAtPath:(NSString *)atPath
|