123456789101112131415161718192021222324252627282930313233343536373839404142 |
- //
- // cachesFileManager.h
- // 隐私保护
- //
- // Created by xd h on 2023/11/21.
- //
- #import <Foundation/Foundation.h>
- #import "uploadFileDataModel.h"
- #define CachesPatch NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]
- //图片路径
- #define kSHPath_image [cachesFileManager getCreateFilePath:[NSString stringWithFormat:@"%@/Image",CachesPatch]]
- //视频路径
- #define kSHPath_video [cachesFileManager getCreateFilePath:[NSString stringWithFormat:@"%@/Video",CachesPatch]]
- //下载缩略图 图片 DownLoadThumbnail
- #define kSHPath_DownLoadThumbnail [cachesFileManager getCreateFilePath:[NSString stringWithFormat:@"%@/DownLoadThumbnail",CachesPatch]]
- //下载文件 图片 DownLoadFile
- #define kSHPath_DownLoadFlie [cachesFileManager getCreateFilePath:[NSString stringWithFormat:@"%@/DownLoadFlie",CachesPatch]]
- NS_ASSUME_NONNULL_BEGIN
- @interface cachesFileManager : NSObject
- //获取文件路径(没有的话创建)
- + (NSString *)getCreateFilePath:(NSString *)path;
- + (BOOL)checkFileIsSaveState:(NSString *)fileName withType:(uploadFileType)type;
- //获取资源名字并且保存资源
- + (NSString *)getFileNameWithContent:(id)content fileName:(NSString*)fileName type:(uploadFileType)type;
- //获取资源路径
- + (NSString *)getFilePathWithName:(NSString *)name type:(uploadFileType)type;
- + (BOOL)copyVideoItemAtPath:(NSString *)Path fileName:(NSString *)fileName error:(NSError *__autoreleasing *)error;
- //删除文件
- + (BOOL)removeItemAtPath:(NSString *)fileName type:(uploadFileType)type error:(NSError *__autoreleasing *)error;
- @end
- NS_ASSUME_NONNULL_END
|