LKDBUtils.h 999 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // NSObject+LKUtils.h
  3. // LKDBHelper
  4. //
  5. // Created by upin on 13-4-15.
  6. // Copyright (c) 2013年 ljh. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface LKDBUtils:NSObject
  10. //返回根目录路径 "document"
  11. +(NSString*) getDocumentPath;
  12. //返回 "document/dir/" 文件夹路径
  13. +(NSString*) getDirectoryForDocuments:(NSString*) dir;
  14. //返回 "document/filename" 路径
  15. +(NSString*) getPathForDocuments:(NSString*)filename;
  16. //返回 "document/dir/filename" 路径
  17. +(NSString*) getPathForDocuments:(NSString *)filename inDir:(NSString*)dir;
  18. //文件是否存在
  19. +(BOOL) isFileExists:(NSString*)filepath;
  20. //删除文件
  21. +(BOOL)deleteWithFilepath:(NSString*)filepath;
  22. //返回该文件目录下 所有文件名
  23. +(NSArray*)getFilenamesWithDir:(NSString*)dir;
  24. //检测字符串是否为空
  25. +(BOOL)checkStringIsEmpty:(NSString *)string;
  26. //把Date 转换成String
  27. +(NSString*)stringWithDate:(NSDate*)date;
  28. //把String 转换成Date
  29. +(NSDate *)dateWithString:(NSString *)str;
  30. @end