// // DSFileManagerCategories.h // Shared categories // // Created by David Sinclair on Tue Mar 23 2004. // Copyright (c) 2004 - 2007 Dejal Systems, LLC. All rights reserved. // // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // Redistributions of source code must retain this list of conditions and the following disclaimer. // // The name of Dejal Systems, LLC may not be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, // INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR // PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR // COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE // SOFTWARE OR THE USE OR OTHER DEALINGS IN THIS SOFTWARE. // @interface NSFileManager (DSFileManagerCategories) - (int)fileSizeAtPath:(NSString *)path; - (NSDate *)fileCreationDateAtPath:(NSString *)path; - (NSDate *)fileModificationDateAtPath:(NSString *)path; - (BOOL)isDirectoryAtPath:(NSString *)path; - (BOOL)isDirectoryAtPath:(NSString *)path butNotPackage:(BOOL)notPackage; - (BOOL)renameFileAtPath:(NSString *)path toFilename:(NSString *)filename deleteExisting:(BOOL)deleteExisting handler:(id)handler; - (BOOL)renameWorkingFile:(NSString *)workingPath forSuccess:(BOOL)success handler:(id)handler; - (BOOL)removeFileIfExistsAtPath:(NSString *)path; + (BOOL)backupPath:(NSString *)path; - (BOOL)copyPath:(NSString *)path withSuffix:(NSString *)suffix replaceExisting:(BOOL)replace handler:(id)handler; - (NSArray *)pathsWithFragments:(NSArray *)fragments isExtension:(BOOL)isExtension atPath:(NSString *)basePath deepScan:(BOOL)deep; - (NSArray *)pathsAtPath:(NSString *)basePath deepScan:(BOOL)deep; - (NSArray *)pathsWithExtensions:(NSArray *)extensions atPath:(NSString *)basePath deepScan:(BOOL)deep; - (NSArray *)pathsWithExtension:(NSString *)extension atPath:(NSString *)basePath deepScan:(BOOL)deep; - (NSArray *)pathsWithFilenames:(NSArray *)filenames atPath:(NSString *)basePath deepScan:(BOOL)deep; - (NSArray *)pathsWithFilename:(NSString *)filename atPath:(NSString *)basePath deepScan:(BOOL)deep; @end