1{ Parsed from Foundation.framework NSPathUtilities.h } 2 3{$ifdef CLASSES} 4 5type 6 NSStringPathExtensions = objccategory external (NSString) 7 class function pathWithComponents (components: NSArray): NSString; message 'pathWithComponents:'; 8 function pathComponents: NSArray; message 'pathComponents'; 9 function isAbsolutePath: ObjCBOOL; message 'isAbsolutePath'; 10 function lastPathComponent: NSString; message 'lastPathComponent'; 11 function stringByDeletingLastPathComponent: NSString; message 'stringByDeletingLastPathComponent'; 12 function stringByAppendingPathComponent (str: NSString): NSString; message 'stringByAppendingPathComponent:'; 13 function pathExtension: NSString; message 'pathExtension'; 14 function stringByDeletingPathExtension: NSString; message 'stringByDeletingPathExtension'; 15 function stringByAppendingPathExtension (str: NSString): NSString; message 'stringByAppendingPathExtension:'; 16 function stringByAbbreviatingWithTildeInPath: NSString; message 'stringByAbbreviatingWithTildeInPath'; 17 function stringByExpandingTildeInPath: NSString; message 'stringByExpandingTildeInPath'; 18 function stringByStandardizingPath: NSString; message 'stringByStandardizingPath'; 19 function stringByResolvingSymlinksInPath: NSString; message 'stringByResolvingSymlinksInPath'; 20 function stringsByAppendingPaths (paths: NSArray): NSArray; message 'stringsByAppendingPaths:'; 21 function completePathIntoString_caseSensitive_matchesIntoArray_filterTypes (outputName: NSStringPtr; flag: ObjCBOOL; outputArray: NSArrayPtr; filterTypes: NSArray): NSUInteger; message 'completePathIntoString:caseSensitive:matchesIntoArray:filterTypes:'; 22 function fileSystemRepresentation: PChar; message 'fileSystemRepresentation'; 23 function getFileSystemRepresentation_maxLength (cname: PChar; max: NSUInteger): ObjCBOOL; message 'getFileSystemRepresentation:maxLength:'; 24 end; 25 26type 27 NSArrayPathExtensions = objccategory external (NSArray) 28 function pathsMatchingExtensions (filterTypes: NSArray): NSArray; message 'pathsMatchingExtensions:'; 29 end; 30{$endif} 31 32{$ifdef FUNCTIONS} 33function NSUserName: NSString; cdecl; external; 34function NSFullUserName: NSString; cdecl; external; 35function NSHomeDirectory: NSString; cdecl; external; 36function NSHomeDirectoryForUser(userName: NSString): NSString; cdecl; external; 37function NSTemporaryDirectory: NSString; cdecl; external; 38function NSOpenStepRootDirectory: NSString; cdecl; external; 39{$endif} 40 41{$ifdef TYPES} 42type 43 NSSearchPathDirectory = NSUInteger; 44 NSSearchPathDirectoryPtr = ^NSSearchPathDirectory; 45 46const 47 NSApplicationDirectory = 1; 48 NSDemoApplicationDirectory = 2; 49 NSDeveloperApplicationDirectory = 3; 50 NSAdminApplicationDirectory = 4; 51 NSLibraryDirectory = 5; 52 NSDeveloperDirectory = 6; 53 NSUserDirectory = 7; 54 NSDocumentationDirectory = 8; 55 NSDocumentDirectory = 9; 56 NSCoreServiceDirectory = 10; 57 NSAutosavedInformationDirectory = 11 { available in 10_6, 4_0 }; 58 NSDesktopDirectory = 12; 59 NSCachesDirectory = 13; 60 NSApplicationSupportDirectory = 14; 61 NSDownloadsDirectory = 15 { available in 10_5, 2_0 }; 62 NSInputMethodsDirectory = 16 { available in 10_6, 4_0 }; 63 NSMoviesDirectory = 17 { available in 10_6, 4_0 }; 64 NSMusicDirectory = 18 { available in 10_6, 4_0 }; 65 NSPicturesDirectory = 19 { available in 10_6, 4_0 }; 66 NSPrinterDescriptionDirectory = 20 { available in 10_6, 4_0 }; 67 NSSharedPublicDirectory = 21 { available in 10_6, 4_0 }; 68 NSPreferencePanesDirectory = 22 { available in 10_6, 4_0 }; 69 NSApplicationScriptsDirectory = 23 { available in 10_8, NA }; 70 NSItemReplacementDirectory = 99 { available in 10_6, 4_0 }; 71 NSAllApplicationsDirectory = 100; 72 NSAllLibrariesDirectory = 101; 73 NSTrashDirectory = 102 { available in 10_8, NA }; 74 75type 76 NSSearchPathDomainMask = NSUInteger; 77 NSSearchPathDomainMaskPtr = ^NSSearchPathDomainMask; 78 79const 80 NSUserDomainMask = 1; 81 NSLocalDomainMask = 2; 82 NSNetworkDomainMask = 4; 83 NSSystemDomainMask = 8; 84 NSAllDomainsMask = $0ffff; 85{$endif} 86 87{$ifdef FUNCTIONS} 88function NSSearchPathForDirectoriesInDomains(directory: NSSearchPathDirectory; domainMask: NSSearchPathDomainMask; expandTilde: ObjCBOOL): NSArray; cdecl; external; 89{$endif} 90 91