// // CJFileUtility.h // // Created by chenjian on 4/25/12. // Copyright (c) 2012 cj. All rights reserved. // #import @interface CJFileUtility : NSObject + (BOOL)addSkipBackupAttributeToItemAtPath:(NSString *)path; + (BOOL)fileExists:(NSString *)fileName; + (long long) fileSizeAtPath:(NSString*)filePath; + (BOOL)writeToFile:(NSString *)fileName data:(NSData*)data; + (BOOL)appendToFile:(NSString *)fileName data:(NSData*)data; + (BOOL)deleteFile:(NSString *)fileName; + (BOOL)renameFile:(NSString *)oldName newName:(NSString*)newName; + (BOOL)copyFile:(NSString *)srcFile to:(NSString *)dstFile; + (BOOL)moveFile:(NSString *)srcFile to:(NSString *)dstFile; + (BOOL)createPath:(NSString *)path; + (NSString *)documentsPath; + (NSString *)tempPath; + (NSString *)cachePath; + (NSString *)cachePathWithFile:(NSString *)fileName; + (NSString *)documentsPathSubDir:(NSString*)subDir; + (NSString *)documentsPathSubDir:(NSString*)subDir andFile:(NSString*)fileName; + (NSString *)documentsPathSubDir:(NSString*)subDir andUrl:(NSString*)url; + (NSString *)changeFileExt:(NSString *)fileName ext:(NSString *)ext; + (NSString *)changeFilePath:(NSString *)path fileName:(NSString *)fileName; @end