You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.2 KiB

//
// CJFileUtility.h
//
// Created by chenjian on 4/25/12.
// Copyright (c) 2012 cj. All rights reserved.
//
#import <Foundation/Foundation.h>
@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