1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //
- // 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]]
- //从文件APP中 拷贝到app里面
- #define kSHPath_FileAPP [cachesFileManager getCreateFilePath:[NSString stringWithFormat:@"%@/FileApp",CachesPatch]]
- //下载缩略图 图片 DownLoadThumbnail
- #define kSHPath_DownLoadThumbnail [cachesFileManager getCreateFilePath:[NSString stringWithFormat:@"%@/DownLoadThumbnail",CachesPatch]]
- //下载文件 图片 DownLoadFile
- #define kSHPath_DownLoadFlie [cachesFileManager getCreateFilePath:[NSString stringWithFormat:@"%@/DownLoadFlie",CachesPatch]]
- //云机最后一帧 路径
- #define kSHPath_cloudPhone_last_image [cachesFileManager getCreateFilePath:[NSString stringWithFormat:@"%@/lastImage_%@/111.png",CachesPatch,ksharedAppDelegate.DeviceThirdIdMod.data.sn]]
- //日志路径
- #define kSHPath_logs [cachesFileManager getCreateFilePath:[NSString stringWithFormat:@"%@/logs/",CachesPatch]]
- #define kSHPath_Crashlogs [cachesFileManager getCreateFilePath:[NSString stringWithFormat:@"%@/Crashlogs/",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;
- //写日志
- + (void)writeLogsWithMsg:(NSString *)msg;
- //写日志
- + (void)writeCrashLogsWithMsg:(NSString *)msg;
- @end
- NS_ASSUME_NONNULL_END
|