- (NSString *)fileSystemPathHFSStyle;
Returns a NSString containg a HFS style path (e.g. Macitosh HD:Users:) useful for display purposes.
Result: A new NSString containing a HFS style path for the same file or directory as the receiver.- (BOOL)getFSRef:(FSRef *)aFSRef;
Initializes an FSRef for a POSIX style path NSString.
Result: Return YES if the method was successful, if the function returns NO then the FSRef pointed to by aFSRef is garbage.
Name Description aFSRef a pointer to a FSRef.
- (BOOL)getFSSpec:(FSSpec *)aFSSpec;
Obtain a FSSpec for a POSIX path.
Result: Returns YES if successful, if the method returns NO then aFSSpec contains garbage.
Name Description aFSSpec A pointer to a FSSpec struct, to be filled by the method.
- (BOOL)pascalString:(StringPtr)aBuffer length:(short)aLength;
Fill the StringPtr with a pascal string equivelent to the receveiver.
Result: Returns YES if the method was successful, if NO is returns then aBuffer contains garbage.
Name Description aBuffer A StringPtr that contains the pascal string on completion. aLength The maximum length the string can be. Pascal string can be no longer than 255 bytes long, 256 if you include the first length byte, so a value of 256 is the desired length.
- (NSString *)pathFromFileSystemPathHFSStyle;
pathFromFileSystemPathHFSStyle returns a POSIX style path from a HFS style path.
Result: A NSString containing a POSIX style path.- (NSString *)resolveAliasFile;
Returns an POSIX path NSString refered to by the receveive if the receveive refers to an alias file. If it does not refer to an alias file the a string identical to the receveive is returned.
Result: An POSIX path NSString.+ (NSString *)stringWithFSRef:(const FSRef *)aFSRef;
Creats a NSString containing a POSIX style path from a FSRef
Result: A NSString containing a POSIX path.
Name Description aFSRef a pointer to a FSRef.
+ (NSString *)stringWithPascalString:(ConstStr255Param)aPStr;
Reurns a new NSString equivelent to the passed in pascal string.
Result: A NSString.
Name Description aPStr A pascal string of type ConstStr255Param.
- (NSString *)trimWhitespace;
Returns a new NSString equivelent to the receveiver but without any white space (return, new line, space, tab) at the begining or end of the string.
Result: A new NSString.© 2003 Nathan Day (Last Updated 11/30/2003)