-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathLSFileWrapper.h
43 lines (33 loc) · 1.38 KB
/
LSFileWrapper.h
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
//
// Copyright (c) 2013 Luke Scott
// https://github.com/lukescott/LSFileWrapper
// Distributed under MIT license
//
#import <Foundation/Foundation.h>
#import <AssetsLibrary/AssetsLibrary.h>
@interface LSFileWrapper : NSObject
- (id)initFile;
- (id)initDirectory;
- (id)initWithURL:(NSURL *)url isDirectory:(BOOL)isDir;
- (NSData *)data;
- (NSString *)string;
- (NSDictionary *)dictionary;
- (UIImage *)image;
- (void)updateContent:(id<NSObject>)content;
- (void)deleteContent;
- (void)incReserve;
- (void)decReserve;
- (void)deleteUnreserved;
- (LSFileWrapper *)fileWrapperWithPath:(NSString *)path;
- (LSFileWrapper *)fileWrapperWithPath:(NSString *)path create:(BOOL)create isDirectory:(BOOL)isDir;
- (NSString *)addFileWrapper:(LSFileWrapper *)fileWrapper withFilename:(NSString *)filename;
- (void)setFileWrapper:(LSFileWrapper *)fileWrapper withFilename:(NSString *)filename;
- (NSString *)addContent:(id<NSObject>)content_ withFilename:(NSString *)filename;
- (void)setContent:(id<NSObject>)content_ withFilename:(NSString *)filename;
- (BOOL)writeUpdatesToURL:(NSURL *)url error:(NSError *__autoreleasing *)outError;
@property (readonly, strong, nonatomic) NSString *filename;
@property (readonly, strong, nonatomic) NSString *fileType;
@property (readonly, nonatomic) BOOL updated;
@property (readonly, nonatomic) BOOL isDirectory;
@property (assign, nonatomic) NSInteger reserve;
@end