Returns a Boolean value that indicates whether a file or directory exists at a specified path.
Original signature is '- (BOOL)fileExistsAtPath:(NSString *)path isDirectory:(BOOL *)isDirectory'
Available in Mac OS X v10.0 and later.
Declaration Syntax
C# | Visual Basic | Visual C++ |
Public Overridable Function FileExistsAtPathIsDirectory ( _ path As NSString, _ <OutAttribute> ByRef isDirectory As Boolean _ ) As Boolean
public: virtual bool FileExistsAtPathIsDirectory( NSString^ path, [OutAttribute] bool% isDirectory )
Parameters
- path (NSString)
- The path of a file or directory. If path begins with a tilde (~), it must first be expanded with stringByExpandingTildeInPath, or this method will return NO.
- isDirectory (Boolean%)
- Upon return, contains YES if path is a directory or if the final path element is a symbolic link that points to a directory, otherwise contains NO. If path doesn’t exist, the return value is undefined. Pass NULL if you do not need this information.
Return Value
YES if there is a file or directory at path, otherwise NO. If the final element in path specifies a symbolic link, this method traverses the link and returns YES or NO based on the existence of the file or directory at the link destination.
Version Information
- Available in Monobjc Bridge: 10.6 (For Mac OS X 10.6 and later), 10.5 (For Mac OS X 10.5 and later)