//
//  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]]

NS_ASSUME_NONNULL_BEGIN

@interface cachesFileManager : NSObject
//获取文件路径（没有的话创建）
+ (NSString *)getCreateFilePath:(NSString *)path;

//获取资源名字并且保存资源
+ (NSString *)getFileNameWithContent:(id)content fileName:(NSString*)fileName type:(uploadFileType)type;
//获取资源路径
+ (NSString *)getFilePathWithName:(NSString *)name type:(uploadFileType)type;
//删除文件
+ (BOOL)removeItemAtPath:(NSString *)fileName type:(uploadFileType)type error:(NSError *__autoreleasing *)error;
@end

NS_ASSUME_NONNULL_END
