NNTagging Reference Library

NSFileManager(Extensions) Class Reference

NSFileManager(Extensions) Class Reference

Declared in NSFileManager+Extensions.h

Tasks

Instance Methods

isSymbolicLinkAtPath:

- (BOOL)isSymbolicLinkAtPath:(NSString *)path
Parameters
path

Path to check

Return Value

YES if path is a symbolic link, NO otherwise

Declared In
NSFileManager+Extensions.h

trashFileAtPath:

- (BOOL)trashFileAtPath:(NSString *)path
Parameters
path

Path to move to trash

Return Value

YES if successful, NO otherwise

Declared In
NSFileManager+Extensions.h

symlinkForFile:inDirectory:

- (NSString *)symlinkForFile:(NSString *)file inDirectory:(NSString *)directory
Parameters
file

Target file of the symlink to look for

directory

Directory in which to look for the symlink

Return Value

Path to symlink on YES, nil on NO

Discussion

Convenience method for symlinkExistsForFile:inDirectory:atPath:. Will return the path on YES, nil on NO

Declared In
NSFileManager+Extensions.h

symlinkExistsForFile:inDirectory:atPath:

- (BOOL)symlinkExistsForFile:(NSString *)file inDirectory:(NSString *)directory atPath:(NSString **)symlinkPathPointer
Parameters
file

Target file of the symlink to look for

directory

Directory in which to look for the symlink

symlinkPathPointer

Pointer to an NSString. If method returns YES, it will contain the symlinkPath, otherwise it will point to a free place where to put a new symlink

Return Value

YES if symlink exists, NO otherwise

Discussion

If a symlink exists, this method will return YES and the passed symlinkPath pointer will be set to the correct symlink. Otherwise it will return NO and symlinkPath will point to a free path for the file.

Declared In
NSFileManager+Extensions.h

Last updated: 2010-5-13