# FBdCache **Repository Path**: donggehaoya/FBdCache ## Basic Information - **Project Name**: FBdCache - **Description**: 自己用NSKeyedUnarchiver封装的缓存 把对象转化成NSData存到本地 - **Primary Language**: Objective-C - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2016-09-28 - **Last Updated**: 2022-11-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README <<<<<<< HEAD #FBdCache // // BDFilePathTool.h // AVPlayerTest // // Created by feng on 16/9/21. // Copyright © 2016年 冯宝东. All rights reserved. // #import @interface BDFilePathTool : NSObject /** 单例的快速创建 @return 工具类单例 */ +(instancetype)defaultTools; /** 获取相对Documents文件夹路径 @param lastCompent 最后的文件夹名称 @return 相对的绝对路径 */ -(NSString*)getFilePathOrCreateFilePathWithlastCompentName:(NSString*)lastCompent; /** 获取或者创建文件夹全路径 @param fullFilePath 文件夹全路径 @return 绝对路径 */ -(NSString*)getFilePathOrCreateFullFilePath:(NSString*)fullFilePath; /** 获取除了扩展名的路径 @param filePath 文件路径 @return 除了扩展名的路径 */ -(NSString*)getExpctExtensionWithFilePath:(NSString*)filePath; /** 获取文件路径的father路径 @param filePath 文件路径 @return 文件的父亲路径 */ -(NSString*)getFatherPathWithFilePath:(NSString*)filePath; /** 获取文件的说明 @param filePath 文件路径 @return 文件的说明 */ -(NSDictionary*)getFileExplanationMessageWithFilePath:(NSString*)filePath; /** 根据数据来创建文件(要带后缀名) @param resultData 数据 @param name 文件名称 (要带后缀名) */ -(void)createFileWithData:(NSData*)resultData withName:(NSString*)name; //拷贝 -(BOOL)copyFileSourcePath:(NSString*)sourcePath toPath:(NSString*)toPath; //移动 -(BOOL)moveFileSourcePath:(NSString*)sourcePath toPath:(NSString*)toPath; //删除 -(BOOL)removeFileSourcePath:(NSString*)sourcePath; //计算文件大小 单位为 M 兆 +(float)getFileSizeAtPath:(NSString *)path; //计算文件夹里面文件大小 单位为 M 兆 +(float)getDirSizeAtPath:(NSString *)path; //清除缓存 +(void)clearCache:(NSString *)path; @end ======= #FBDCache 写这个类的目的在于网络请求的数据进行数据持久化,为了在没有网络的时候可以得到最近的数据! >>>>>>> 95ebf9c2295ed845e1ec0957f37a9ea4c6fe2fa6