-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathSMFFolderBrowser.h
88 lines (74 loc) · 2.26 KB
/
SMFFolderBrowser.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//
// SMFolderBrowser.h
// SoftwareMenuFramework
//
// Created by Thomas on 4/19/09.
// Copyright 2009 tomcool.org. All rights reserved.
//
#import "Backrow/AppleTV.h"
#import "SMFMediaMenuController.h"
#import "SMFPreferences.h"
#import "SMFPhotoMethods.h"
#import "SMFFolderBrowserDelegate.h"
/**
* SMFFolderBrowser is a subclass of SMFMediaMenuController that enables easily browsing through the file system
*
* It uses a delegate to make it easily extensible. This Delegate needs to conform to SMFFolderBrowserDelegate protocol
*
*/
@interface SMFFolderBrowser : SMFMediaMenuController
{
NSString * path;
NSMutableArray * _paths;
NSFileManager * _man;
NSMutableArray * _files;
NSMutableArray * _folders;
BOOL separate;
BOOL showHidden;
BOOL showOnlyFolders;
NSObject<SMFFolderBrowserDelegate>* delegate;
NSString * fpath;
}
+ (void)setString:(NSString *)inputString forKey:(NSString *)theKey inDomain:(NSString *)theDomain;
+ (NSString *)stringForKey:(NSString *)theKey inDomain:(NSString *)theDomain;
/**
*set the path of a folder to browse
*If the path is `nil`, does not exist or is not a folder, the browser wil be empty but it will not crash
*@param thePath Path to browse. (example: `@"/private/var/mobile"`)
*
*/
-(void)setPath:(NSString *)thePath;
/**
*Reloads the folder in case the files have changed
*/
-(void)reloadFiles;
/**
*Create a new instance with a defined path
*
*use this method instead of simply init
*
*@param thePath Path to browse.
* @see setPath:
*/
-(id)initWithPath:(NSString *)thePath;
/**
*Defines if the folders are seperated from the files
*/
@property (assign) BOOL separate;
/**
*Show hidden files (starting with .)
*/
@property (assign) BOOL showHidden;
/**
*Ignore files and only show folders
*/
@property (assign) BOOL showOnlyFolders;
/**
*The delegate handling all the commands
*/
@property (retain) NSObject<SMFFolderBrowserDelegate>* delegate;
/**
*The path that is currently browsed
*/
@property (retain) NSString *fpath;
@end