-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathCacheFile.h
More file actions
44 lines (27 loc) · 941 Bytes
/
CacheFile.h
File metadata and controls
44 lines (27 loc) · 941 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// CacheFile.h
// injoy
//
// Created by tao hans on 13-3-22.
// Copyright (c) 2013年 injoy365.net. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CacheFile : NSObject
// 缓存文件 设置
+(BOOL)cache_file_set:(NSString*)fileName contents:(NSString*)contents;
// 缓存文件 设置 NSData
+(BOOL)cache_file_set_nsdata:(NSString*)fileName contents:(NSData*)contents;
// 缓存文件 读取
+(NSString*)cache_file_get:(NSString*)fileName;
// 缓存文件 读取 NSData
+(NSData*)cache_file_get_nsdata:(NSString*)fileName;
// 缓存文件 是否过期
// expiredSecond 过期多少秒
+(BOOL)cache_file_expired:(NSString*)fileName expiredSecond:(NSInteger)expiredSecond;
// 缓存文件 是否存在
+(BOOL)cache_file_exists:(NSString*)fileName;
// 缓存文件 删除
+(BOOL)cache_file_delete:(NSString*)fileName;
// 缓存文件 路径
+(NSString*)cache_file_path:(NSString*) fileName;
@end