NSFileManager(FileTest) |
Extends Class: NSFileManager
Declared In: FileTest.h
The FileTest category adds short methods that mimic the Unix shell file test operators like -x and -d. These methods are implemented with the default file manager, which is available as filem.
The access tests (test_r:, test_w:, and test_x:) use only standard Unix user and group ids. Access control lists are not considered.
test_d: |
- (FSBoolean*) test_d:(NSString*)path;
Returns true if the path exists and is a directory.
test_e: |
- (FSBoolean*) test_e:(NSString*)path;
Returns true if the file path exists.
test_f: |
- (FSBoolean*) test_f:(NSString*)path;
Returns true if the path exists and is a file.
test_g: |
- (FSBoolean*) test_g:(NSString*)path;
Returns true if the file exists and owned by the current group.
test_m: |
- (NSDate*) test_m:(NSString*)path;
Returns the modification date of the file, if it exists.
test_o: |
- (FSBoolean*) test_o:(NSString*)path;
Returns true if the file exists and owned by the current user.
test_r: |
- (FSBoolean*) test_r:(NSString*)path;
Returns true if the file exists and is readable by the current user.
test_s: |
- (NSNumber*) test_s:(NSString*)path;
Returns the size in bytes of the file, if its exists.
test_w: |
- (FSBoolean*) test_w:(NSString*)path;
Returns true if the file exists and is writeable by the current user.
test_x: |
- (FSBoolean*) test_x:(NSString*)path;
Returns true if the file exists and is executable by the current user.
test_z: |
- (FSBoolean*) test_z:(NSString*)path;
Returns true if the file exists and has non-zero size.
© Andrew Weinrich Last Updated: Wednesday, October 15, 2008