| 1 |
/* |
| 2 |
* Copyright (c) 2004-2005 The Lupin Project. All rights reserved. |
| 3 |
* |
| 4 |
* Redistribution and use in source and binary forms, with or without modification, are permitted |
| 5 |
* provided that the following conditions are met: |
| 6 |
* |
| 7 |
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions |
| 8 |
* and the following disclaimer. |
| 9 |
* |
| 10 |
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of |
| 11 |
* conditions and the following disclaimer in the documentation and/or other materials provided |
| 12 |
* with the distribution. |
| 13 |
* |
| 14 |
* THIS SOFTWARE IS PROVIDED BY THE LUPIN PROJECT ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, |
| 15 |
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE LUPIN PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| 17 |
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 18 |
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 19 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 20 |
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 21 |
* POSSIBILITY OF SUCH DAMAGE. |
| 22 |
*/ |
| 23 |
|
| 24 |
#import <Foundation/Foundation.h> |
| 25 |
|
| 26 |
|
| 27 |
@interface LPFile : NSObject { |
| 28 |
NSMutableDictionary* _infoDict; |
| 29 |
BOOL _isDir; //! �f�B���N�g������YES�A�t�@�C������NO |
| 30 |
BOOL _isExpanded; //! �s���W�J�������������i�������������������������t�H���_�����S�t�@�C���������j�i�\�[�g�������������[�h�����������g���������j |
| 31 |
} |
| 32 |
|
| 33 |
- (LPFile*)init:(NSString*)filePath name:(NSString*)name modifiedDate:(NSDate*)modifiedDate createdDate:(NSDate*)createdDate size:(NSNumber*)size kind:(NSString*)kind isDir:(BOOL)isDir; |
| 34 |
- (void)appendFile:(LPFile*)file hierarchy:(BOOL)hierarchy; |
| 35 |
- (void)appendFile:(LPFile*)file index:(int)index; |
| 36 |
- (NSString*)path; |
| 37 |
- (NSString*)name; |
| 38 |
- (BOOL)isDir; |
| 39 |
- (BOOL)isExpanded; |
| 40 |
- (void)setExpanded:(BOOL)expanded; |
| 41 |
- (NSString*)kind; |
| 42 |
- (NSString*)kindForFile:(NSString *)path; |
| 43 |
- (NSImage*)icon; |
| 44 |
- (void)setIcon:(NSImage*)icon; |
| 45 |
- (NSNumber*)size; |
| 46 |
- (NSNumber*)totalSize; |
| 47 |
- (void)setTotalSize:(NSNumber*)_totalSize; |
| 48 |
- (NSNumber*)totalNumOfChildren; |
| 49 |
- (void)setTotalNumOfChildren:(NSNumber*)_totalNumOfChildren; |
| 50 |
- (NSString*)convertSize; |
| 51 |
- (NSDate*)modifiedDate; |
| 52 |
- (NSDate*)createdDate; |
| 53 |
- (NSString*)convertModifiedDateWithWidth:(float)width; |
| 54 |
- (NSString*)convertCreatedDateWithWidth:(float)width; |
| 55 |
- (NSString*)convertDate:(NSDate*)_date width:(float)width; |
| 56 |
|
| 57 |
- (void)sortBy:(NSString*)identifier order:(BOOL)order; |
| 58 |
|
| 59 |
- (NSMutableArray*)children; |
| 60 |
- (void)addChild:(LPFile*)child; |
| 61 |
- (void)dealloc; |
| 62 |
|
| 63 |
@end |