75d24c15
yangbin
123
|
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
45
46
47
48
49
50
51
52
|
//
// RTKFileBrowseViewController.h
// RTKTest
//
// Created by jerome_gu on 2018/5/29.
// Copyright © 2018年 jerome_gu. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, RTKFileBrowseStyle) {
RTKFileBrowseStyleView,
RTKFileBrowseStyleSelection,
RTKFileBrowseStyleViewAndSelection,
};
@class RTKFileBrowseViewController;
@protocol RTKFileBrowseViewControllerDelegate <NSObject>
@optional
- (BOOL)fileBrowseViewController:(RTKFileBrowseViewController *)browser shouldPreviewFileAtPath:(NSString *)path;
- (void)fileBrowseViewController:(RTKFileBrowseViewController *)browser didSelectRegularFileAtPath:(NSString *)path;
@end
@interface RTKFileBrowseViewController : UITableViewController
@property (nonatomic) RTKFileBrowseStyle style;
- (instancetype)initWithRootPath:(NSString *)path;
@property (nonatomic, copy) NSString *rootPath;
@property (nonatomic) NSURL *rootDirectoryURL;
// Default NO
@property (nonatomic) BOOL showHiddenFiles;
@property (weak) id<RTKFileBrowseViewControllerDelegate> delegate;
@property (readonly, nonatomic) NSString *currentDirectoryPath;
@property (readonly, nonatomic) NSURL *currentDirectoryURL;
@property (readonly) NSArray <NSString *> *contents;
@end
NS_ASSUME_NONNULL_END
|