Statistics
| Branch: | Tag: | Revision:

root / Classes / Folder.h @ 38d59b6c

History | View | Annotate | Download (1.1 kB)

1
//
2
//  Folder.h
3
//  OpenStack
4
//
5
//  Created by Mike Mayo on 12/7/10.
6
//  The OpenStack project is provided under the Apache 2.0 license.
7
//
8

    
9
#import <Foundation/Foundation.h>
10

    
11
// there isn't really a folder resource in the API.  this is an
12
// abstraction to simulate folders based on object names with
13
// slashes in them.
14
// example: MyContainer has the following files:
15
// 1. test.txt
16
// 2. folder/abc.txt
17
// 3. folder/def.txt
18
// In this case, there would be a folder object for files 2 and 3
19

    
20
@interface Folder : NSObject <NSCoding> {
21
        NSString *name;
22
        Folder *parent;
23
        NSMutableDictionary *folders;
24
        NSMutableDictionary *objects;
25
    NSArray *sortedContents;
26
    
27
    NSMutableDictionary *metadata;
28
}
29

    
30
@property (nonatomic, retain) NSString *name;
31
@property (nonatomic, retain) Folder *parent;
32
@property (nonatomic, retain) NSMutableDictionary *folders;
33
@property (nonatomic, retain) NSMutableDictionary *objects;
34
@property (readonly, retain) NSArray *sortedContents;
35
@property (nonatomic, retain) NSMutableDictionary *metadata;
36

    
37
+ (id)folder;
38
- (NSArray *)sortedContents;
39
- (NSString *)fullPath;
40

    
41
@end