CFURL.pas 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377
  1. { CFURL.h
  2. Copyright (c) 1998-2013, Apple Inc. All rights reserved.
  3. }
  4. {
  5. Modified for use with Free Pascal
  6. Version 308
  7. Please report any bugs to <[email protected]>
  8. }
  9. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  10. {$mode macpas}
  11. {$modeswitch cblocks}
  12. {$packenum 1}
  13. {$macro on}
  14. {$inline on}
  15. {$calling mwpascal}
  16. {$IFNDEF FPC_DOTTEDUNITS}
  17. unit CFURL;
  18. {$ENDIF FPC_DOTTEDUNITS}
  19. interface
  20. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  21. {$setc GAP_INTERFACES_VERSION := $0308}
  22. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  23. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  24. {$endc}
  25. {$ifc defined CPUPOWERPC and defined CPUI386}
  26. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  27. {$endc}
  28. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  29. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  30. {$endc}
  31. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  32. {$setc __ppc__ := 1}
  33. {$elsec}
  34. {$setc __ppc__ := 0}
  35. {$endc}
  36. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  37. {$setc __ppc64__ := 1}
  38. {$elsec}
  39. {$setc __ppc64__ := 0}
  40. {$endc}
  41. {$ifc not defined __i386__ and defined CPUI386}
  42. {$setc __i386__ := 1}
  43. {$elsec}
  44. {$setc __i386__ := 0}
  45. {$endc}
  46. {$ifc not defined __x86_64__ and defined CPUX86_64}
  47. {$setc __x86_64__ := 1}
  48. {$elsec}
  49. {$setc __x86_64__ := 0}
  50. {$endc}
  51. {$ifc not defined __arm__ and defined CPUARM}
  52. {$setc __arm__ := 1}
  53. {$elsec}
  54. {$setc __arm__ := 0}
  55. {$endc}
  56. {$ifc not defined __arm64__ and defined CPUAARCH64}
  57. {$setc __arm64__ := 1}
  58. {$elsec}
  59. {$setc __arm64__ := 0}
  60. {$endc}
  61. {$ifc defined cpu64}
  62. {$setc __LP64__ := 1}
  63. {$elsec}
  64. {$setc __LP64__ := 0}
  65. {$endc}
  66. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  67. {$error Conflicting definitions for __ppc__ and __i386__}
  68. {$endc}
  69. {$ifc defined __ppc__ and __ppc__}
  70. {$setc TARGET_CPU_PPC := TRUE}
  71. {$setc TARGET_CPU_PPC64 := FALSE}
  72. {$setc TARGET_CPU_X86 := FALSE}
  73. {$setc TARGET_CPU_X86_64 := FALSE}
  74. {$setc TARGET_CPU_ARM := FALSE}
  75. {$setc TARGET_CPU_ARM64 := FALSE}
  76. {$setc TARGET_OS_MAC := TRUE}
  77. {$setc TARGET_OS_IPHONE := FALSE}
  78. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  79. {$setc TARGET_OS_EMBEDDED := FALSE}
  80. {$elifc defined __ppc64__ and __ppc64__}
  81. {$setc TARGET_CPU_PPC := FALSE}
  82. {$setc TARGET_CPU_PPC64 := TRUE}
  83. {$setc TARGET_CPU_X86 := FALSE}
  84. {$setc TARGET_CPU_X86_64 := FALSE}
  85. {$setc TARGET_CPU_ARM := FALSE}
  86. {$setc TARGET_CPU_ARM64 := FALSE}
  87. {$setc TARGET_OS_MAC := TRUE}
  88. {$setc TARGET_OS_IPHONE := FALSE}
  89. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  90. {$setc TARGET_OS_EMBEDDED := FALSE}
  91. {$elifc defined __i386__ and __i386__}
  92. {$setc TARGET_CPU_PPC := FALSE}
  93. {$setc TARGET_CPU_PPC64 := FALSE}
  94. {$setc TARGET_CPU_X86 := TRUE}
  95. {$setc TARGET_CPU_X86_64 := FALSE}
  96. {$setc TARGET_CPU_ARM := FALSE}
  97. {$setc TARGET_CPU_ARM64 := FALSE}
  98. {$ifc defined iphonesim}
  99. {$setc TARGET_OS_MAC := FALSE}
  100. {$setc TARGET_OS_IPHONE := TRUE}
  101. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  102. {$elsec}
  103. {$setc TARGET_OS_MAC := TRUE}
  104. {$setc TARGET_OS_IPHONE := FALSE}
  105. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  106. {$endc}
  107. {$setc TARGET_OS_EMBEDDED := FALSE}
  108. {$elifc defined __x86_64__ and __x86_64__}
  109. {$setc TARGET_CPU_PPC := FALSE}
  110. {$setc TARGET_CPU_PPC64 := FALSE}
  111. {$setc TARGET_CPU_X86 := FALSE}
  112. {$setc TARGET_CPU_X86_64 := TRUE}
  113. {$setc TARGET_CPU_ARM := FALSE}
  114. {$setc TARGET_CPU_ARM64 := FALSE}
  115. {$ifc defined iphonesim}
  116. {$setc TARGET_OS_MAC := FALSE}
  117. {$setc TARGET_OS_IPHONE := TRUE}
  118. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  119. {$elsec}
  120. {$setc TARGET_OS_MAC := TRUE}
  121. {$setc TARGET_OS_IPHONE := FALSE}
  122. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  123. {$endc}
  124. {$setc TARGET_OS_EMBEDDED := FALSE}
  125. {$elifc defined __arm__ and __arm__}
  126. {$setc TARGET_CPU_PPC := FALSE}
  127. {$setc TARGET_CPU_PPC64 := FALSE}
  128. {$setc TARGET_CPU_X86 := FALSE}
  129. {$setc TARGET_CPU_X86_64 := FALSE}
  130. {$setc TARGET_CPU_ARM := TRUE}
  131. {$setc TARGET_CPU_ARM64 := FALSE}
  132. {$setc TARGET_OS_MAC := FALSE}
  133. {$setc TARGET_OS_IPHONE := TRUE}
  134. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  135. {$setc TARGET_OS_EMBEDDED := TRUE}
  136. {$elifc defined __arm64__ and __arm64__}
  137. {$setc TARGET_CPU_PPC := FALSE}
  138. {$setc TARGET_CPU_PPC64 := FALSE}
  139. {$setc TARGET_CPU_X86 := FALSE}
  140. {$setc TARGET_CPU_X86_64 := FALSE}
  141. {$setc TARGET_CPU_ARM := FALSE}
  142. {$setc TARGET_CPU_ARM64 := TRUE}
  143. {$ifc defined ios}
  144. {$setc TARGET_OS_MAC := FALSE}
  145. {$setc TARGET_OS_IPHONE := TRUE}
  146. {$setc TARGET_OS_EMBEDDED := TRUE}
  147. {$elsec}
  148. {$setc TARGET_OS_MAC := TRUE}
  149. {$setc TARGET_OS_IPHONE := FALSE}
  150. {$setc TARGET_OS_EMBEDDED := FALSE}
  151. {$endc}
  152. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  153. {$elsec}
  154. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ nor __arm64__ is defined.}
  155. {$endc}
  156. {$ifc defined __LP64__ and __LP64__ }
  157. {$setc TARGET_CPU_64 := TRUE}
  158. {$elsec}
  159. {$setc TARGET_CPU_64 := FALSE}
  160. {$endc}
  161. {$ifc defined FPC_BIG_ENDIAN}
  162. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  163. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  164. {$elifc defined FPC_LITTLE_ENDIAN}
  165. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  166. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  167. {$elsec}
  168. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  169. {$endc}
  170. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  171. {$setc CALL_NOT_IN_CARBON := FALSE}
  172. {$setc OLDROUTINENAMES := FALSE}
  173. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  174. {$setc OPAQUE_UPP_TYPES := TRUE}
  175. {$setc OTCARBONAPPLICATION := TRUE}
  176. {$setc OTKERNEL := FALSE}
  177. {$setc PM_USE_SESSION_APIS := TRUE}
  178. {$setc TARGET_API_MAC_CARBON := TRUE}
  179. {$setc TARGET_API_MAC_OS8 := FALSE}
  180. {$setc TARGET_API_MAC_OSX := TRUE}
  181. {$setc TARGET_CARBON := TRUE}
  182. {$setc TARGET_CPU_68K := FALSE}
  183. {$setc TARGET_CPU_MIPS := FALSE}
  184. {$setc TARGET_CPU_SPARC := FALSE}
  185. {$setc TARGET_OS_UNIX := FALSE}
  186. {$setc TARGET_OS_WIN32 := FALSE}
  187. {$setc TARGET_RT_MAC_68881 := FALSE}
  188. {$setc TARGET_RT_MAC_CFM := FALSE}
  189. {$setc TARGET_RT_MAC_MACHO := TRUE}
  190. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  191. {$setc TYPE_BOOL := FALSE}
  192. {$setc TYPE_EXTENDED := FALSE}
  193. {$setc TYPE_LONGLONG := TRUE}
  194. {$IFDEF FPC_DOTTEDUNITS}
  195. uses MacOsApi.MacTypes,MacOsApi.CFBase,MacOsApi.CFArray,MacOsApi.CFData,MacOsApi.CFDictionary,MacOsApi.CFError,MacOsApi.CFString,MacOsApi.Files;
  196. {$ELSE FPC_DOTTEDUNITS}
  197. uses MacTypes,CFBase,CFArray,CFData,CFDictionary,CFError,CFString,Files;
  198. {$ENDIF FPC_DOTTEDUNITS}
  199. {$endc} {not MACOSALLINCLUDE}
  200. {$ALIGN POWER}
  201. type
  202. CFURLPathStyle = CFIndex;
  203. const
  204. kCFURLPOSIXPathStyle = 0;
  205. kCFURLHFSPathStyle = 1; { The use of kCFURLHFSPathStyle is deprecated. The Carbon File Manager, which uses HFS style paths, is deprecated. HFS style paths are unreliable because they can arbitrarily refer to multiple volumes if those volumes have identical volume names. You should instead use kCFURLPOSIXPathStyle wherever possible. }
  206. kCFURLWindowsPathStyle = 2;
  207. { CFURLRef moved to CFBase to avoid circular dependency with Files unit }
  208. { CFURLs are composed of two fundamental pieces - their string, and a }
  209. { (possibly NULL) base URL. A relative URL is one in which the string }
  210. { by itself does not fully specify the URL (for instance "myDir/image.tiff"); }
  211. { an absolute URL is one in which the string does fully specify the URL }
  212. { ("file://localhost/myDir/image.tiff"). Absolute URLs always have NULL }
  213. { base URLs; however, it is possible for a URL to have a NULL base, and still }
  214. { not be absolute. Such a URL has only a relative string, and cannot be }
  215. { resolved. Two CFURLs are considered equal if and only if their strings }
  216. { are equal and their bases are equal. In other words, }
  217. { "file://localhost/myDir/image.tiff" is NOT equal to the URL with relative }
  218. { string "myDir/image.tiff" and base URL "file://localhost/". Clients that }
  219. { need these less strict form of equality should convert all URLs to their }
  220. { absolute form via CFURLCopyAbsoluteURL(), then compare the absolute forms. }
  221. function CFURLGetTypeID: CFTypeID; external name '_CFURLGetTypeID';
  222. { encoding will be used both to interpret the bytes of URLBytes, and to }
  223. { interpret any percent-escapes within the bytes. }
  224. { Using a string encoding which isn't a superset of ASCII encoding is not }
  225. { supported because CFURLGetBytes and CFURLGetByteRangeForComponent require }
  226. { 7-bit ASCII characters to be stored in a single 8-bit byte. }
  227. { CFStringEncodings which are a superset of ASCII encoding include MacRoman, }
  228. { WindowsLatin1, ISOLatin1, NextStepLatin, ASCII, and UTF8. }
  229. function CFURLCreateWithBytes( allocator: CFAllocatorRef; URLBytes: UInt8Ptr; length: CFIndex; encoding: CFStringEncoding; baseURL: CFURLRef ): CFURLRef; external name '_CFURLCreateWithBytes';
  230. { Escapes any character that is not 7-bit ASCII with the byte-code }
  231. { for the given encoding. If escapeWhitespace is true, whitespace }
  232. { characters (' ', '\t', '\r', '\n') will be escaped also (desirable }
  233. { if embedding the URL into a larger text stream like HTML) }
  234. function CFURLCreateData( allocator: CFAllocatorRef; url: CFURLRef; encoding: CFStringEncoding; escapeWhitespace: Boolean ): CFDataRef; external name '_CFURLCreateData';
  235. { Any escape sequences in URLString will be interpreted via UTF-8. }
  236. function CFURLCreateWithString( allocator: CFAllocatorRef; URLString: CFStringRef; baseURL: CFURLRef ): CFURLRef; external name '_CFURLCreateWithString';
  237. {#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
  238. { Create an absolute URL directly, without requiring the extra step }
  239. { of calling CFURLCopyAbsoluteURL(). If useCompatibilityMode is }
  240. { true, the rules historically used on the web are used to resolve }
  241. { relativeString against baseURL - these rules are generally listed }
  242. { in the RFC as optional or alternate interpretations. Otherwise, }
  243. { the strict rules from the RFC are used. The major differences are }
  244. { that in compatibility mode, we are lenient of the scheme appearing }
  245. { in relative portion, leading "../" components are removed from the }
  246. { final URL's path, and if the relative portion contains only }
  247. { resource specifier pieces (query, parameters, and fragment), then }
  248. { the last path component of the base URL will not be deleted. }
  249. { Using a string encoding which isn't a superset of ASCII encoding is not }
  250. { supported because CFURLGetBytes and CFURLGetByteRangeForComponent require }
  251. { 7-bit ASCII characters to be stored in a single 8-bit byte. }
  252. { CFStringEncodings which are a superset of ASCII encoding include MacRoman, }
  253. { WindowsLatin1, ISOLatin1, NextStepLatin, ASCII, and UTF8. }
  254. function CFURLCreateAbsoluteURLWithBytes( alloc: CFAllocatorRef; relativeURLBytes: UInt8Ptr; length: CFIndex; encoding: CFStringEncoding; baseURL: CFURLRef; useCompatibilityMode: Boolean ): CFURLRef; external name '_CFURLCreateAbsoluteURLWithBytes';
  255. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  256. {#endif}
  257. { filePath should be the URL's path expressed as a path of the type }
  258. { fsType. If filePath is not absolute, the resulting URL will be }
  259. { considered relative to the current working directory (evaluated }
  260. { at creation time). isDirectory determines whether filePath is }
  261. { treated as a directory path when resolving against relative path }
  262. { components }
  263. function CFURLCreateWithFileSystemPath( allocator: CFAllocatorRef; filePath: CFStringRef; pathStyle: CFURLPathStyle; isDirectory: Boolean ): CFURLRef; external name '_CFURLCreateWithFileSystemPath';
  264. function CFURLCreateFromFileSystemRepresentation( allocator: CFAllocatorRef; buffer: CStringPtr; bufLen: CFIndex; isDirectory: Boolean ): CFURLRef; external name '_CFURLCreateFromFileSystemRepresentation';
  265. { The path style of the baseURL must match the path style of the relative }
  266. { url or the results are undefined. If the provided filePath looks like an }
  267. { absolute path ( starting with '/' if pathStyle is kCFURLPosixPathStyle, }
  268. { not starting with ':' for kCFURLHFSPathStyle, or starting with what looks }
  269. { like a drive letter and colon for kCFURLWindowsPathStyle ) then the baseURL }
  270. { is ignored. }
  271. function CFURLCreateWithFileSystemPathRelativeToBase( allocator: CFAllocatorRef; filePath: CFStringRef; pathStyle: CFURLPathStyle; isDirectory: Boolean; baseURL: CFURLRef ): CFURLRef; external name '_CFURLCreateWithFileSystemPathRelativeToBase';
  272. function CFURLCreateFromFileSystemRepresentationRelativeToBase( allocator: CFAllocatorRef; buffer: CStringPtr; bufLen: CFIndex; isDirectory: Boolean; baseURL: CFURLRef ): CFURLRef; external name '_CFURLCreateFromFileSystemRepresentationRelativeToBase';
  273. { Fills buffer with the file system's native representation of }
  274. { url's path. No more than maxBufLen bytes are written to buffer. }
  275. { The buffer should be at least the maximum path length for }
  276. { the file system in question to avoid failures for insufficiently }
  277. { large buffers. If resolveAgainstBase is true, the url's relative }
  278. { portion is resolved against its base before the path is computed. }
  279. { Returns success or failure. }
  280. function CFURLGetFileSystemRepresentation( url: CFURLRef; resolveAgainstBase: Boolean; buffer: CStringPtr; maxBufLen: CFIndex ): Boolean; external name '_CFURLGetFileSystemRepresentation';
  281. { Creates a new URL by resolving the relative portion of relativeURL against its base. }
  282. function CFURLCopyAbsoluteURL( relativeURL: CFURLRef ): CFURLRef; external name '_CFURLCopyAbsoluteURL';
  283. { Returns the URL's string. }
  284. function CFURLGetString( anURL: CFURLRef ): CFStringRef; external name '_CFURLGetString';
  285. { Returns the base URL if it exists }
  286. function CFURLGetBaseURL( anURL: CFURLRef ): CFURLRef; external name '_CFURLGetBaseURL';
  287. {
  288. All URLs can be broken into two pieces - the scheme (preceding the
  289. first colon) and the resource specifier (following the first colon).
  290. Most URLs are also "standard" URLs conforming to RFC 1808 (available
  291. from www.w3c.org). This category includes URLs of the file, http,
  292. https, and ftp schemes, to name a few. Standard URLs start the
  293. resource specifier with two slashes ("//"), and can be broken into
  294. four distinct pieces - the scheme, the net location, the path, and
  295. further resource specifiers (typically an optional parameter, query,
  296. and/or fragment). The net location appears immediately following
  297. the two slashes and goes up to the next slash; it's format is
  298. scheme-specific, but is usually composed of some or all of a username,
  299. password, host name, and port. The path is a series of path components
  300. separated by slashes; if the net location is present, the path always
  301. begins with a slash. Standard URLs can be relative to another URL,
  302. in which case at least the scheme and possibly other pieces as well
  303. come from the base URL (see RFC 1808 for precise details when resolving
  304. a relative URL against its base). The full URL is therefore
  305. <scheme> "://" <net location> <path, always starting with slash> <add'l resource specifiers>
  306. If a given CFURL can be decomposed (that is, conforms to RFC 1808), you
  307. can ask for each of the four basic pieces (scheme, net location, path,
  308. and resource specifer) separately, as well as for its base URL. The
  309. basic pieces are returned with any percent escape sequences still in
  310. place (although note that the scheme may not legally include any
  311. percent escapes); this is to allow the caller to distinguish between
  312. percent sequences that may have syntactic meaning if replaced by the
  313. character being escaped (for instance, a '/' in a path component).
  314. Since only the individual schemes know which characters are
  315. syntactically significant, CFURL cannot safely replace any percent
  316. escape sequences. However, you can use
  317. CFURLCreateStringByReplacingPercentEscapes() to create a new string with
  318. the percent escapes removed; see below.
  319. If a given CFURL can not be decomposed, you can ask for its scheme and its
  320. resource specifier; asking it for its net location or path will return NULL.
  321. To get more refined information about the components of a decomposable
  322. CFURL, you may ask for more specific pieces of the URL, expressed with
  323. the percent escapes removed. The available functions are CFURLCopyHostName(),
  324. CFURLGetPortNumber() (returns an Int32), CFURLCopyUserName(),
  325. CFURLCopyPassword(), CFURLCopyQuery(), CFURLCopyParameters(), and
  326. CFURLCopyFragment(). Because the parameters, query, and fragment of an
  327. URL may contain scheme-specific syntaxes, these methods take a second
  328. argument, giving a list of characters which should NOT be replaced if
  329. percent escaped. For instance, the ftp parameter syntax gives simple
  330. key-value pairs as "<key>=<value>;" Clearly if a key or value includes
  331. either '=' or ';', it must be escaped to avoid corrupting the meaning of
  332. the parameters, so the caller may request the parameter string as
  333. CFStringRef myParams = CFURLCopyParameters(ftpURL, CFSTR("=;%"));
  334. requesting that all percent escape sequences be replaced by the represented
  335. characters, except for escaped '=', '%' or ';' characters. Pass the empty
  336. string (CFSTR("")) to request that all percent escapes be replaced, or NULL
  337. to request that none be.
  338. }
  339. { Returns true if anURL conforms to RFC 1808 }
  340. function CFURLCanBeDecomposed( anURL: CFURLRef ): Boolean; external name '_CFURLCanBeDecomposed';
  341. { The next several methods leave any percent escape sequences intact }
  342. function CFURLCopyScheme( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyScheme';
  343. { NULL if CFURLCanBeDecomposed(anURL) is false }
  344. function CFURLCopyNetLocation( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyNetLocation';
  345. { NULL if CFURLCanBeDecomposed(anURL) is false; also does not resolve the URL }
  346. { against its base. See also CFURLCopyAbsoluteURL(). Note that, strictly }
  347. { speaking, any leading '/' is not considered part of the URL's path, although }
  348. { its presence or absence determines whether the path is absolute. }
  349. { CFURLCopyPath()'s return value includes any leading slash (giving the path }
  350. { the normal POSIX appearance); CFURLCopyStrictPath()'s return value omits any }
  351. { leading slash, and uses isAbsolute to report whether the URL's path is absolute. }
  352. { CFURLCopyFileSystemPath() returns the URL's path as a file system path for the }
  353. { given path style. All percent escape sequences are replaced. The URL is not }
  354. { resolved against its base before computing the path. }
  355. function CFURLCopyPath( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyPath';
  356. function CFURLCopyStrictPath( anURL: CFURLRef; var isAbsolute: Boolean ): CFStringRef; external name '_CFURLCopyStrictPath';
  357. function CFURLCopyFileSystemPath( anURL: CFURLRef; pathStyle: CFURLPathStyle ): CFStringRef; external name '_CFURLCopyFileSystemPath';
  358. { Returns whether anURL's path represents a directory }
  359. { (true returned) or a simple file (false returned) }
  360. function CFURLHasDirectoryPath( anURL: CFURLRef ): Boolean; external name '_CFURLHasDirectoryPath';
  361. { Any additional resource specifiers after the path. For URLs }
  362. { that cannot be decomposed, this is everything except the scheme itself. }
  363. function CFURLCopyResourceSpecifier( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyResourceSpecifier';
  364. function CFURLCopyHostName( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyHostName';
  365. function CFURLGetPortNumber( anURL: CFURLRef ): SInt32; external name '_CFURLGetPortNumber'; { Returns -1 if no port number is specified }
  366. function CFURLCopyUserName( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyUserName';
  367. function CFURLCopyPassword( anURL: CFURLRef ): CFStringRef; external name '_CFURLCopyPassword';
  368. { These remove all percent escape sequences except those for }
  369. { characters in charactersToLeaveEscaped. If charactersToLeaveEscaped }
  370. { is empty (""), all percent escape sequences are replaced by their }
  371. { corresponding characters. If charactersToLeaveEscaped is NULL, }
  372. { then no escape sequences are removed at all }
  373. function CFURLCopyParameterString( anURL: CFURLRef; charactersToLeaveEscaped: CFStringRef ): CFStringRef; external name '_CFURLCopyParameterString';
  374. function CFURLCopyQueryString( anURL: CFURLRef; charactersToLeaveEscaped: CFStringRef ): CFStringRef; external name '_CFURLCopyQueryString';
  375. function CFURLCopyFragment( anURL: CFURLRef; charactersToLeaveEscaped: CFStringRef ): CFStringRef; external name '_CFURLCopyFragment';
  376. function CFURLCopyLastPathComponent( url: CFURLRef ): CFStringRef; external name '_CFURLCopyLastPathComponent';
  377. function CFURLCopyPathExtension( url: CFURLRef ): CFStringRef; external name '_CFURLCopyPathExtension';
  378. { These functions all treat the base URL of the supplied url as }
  379. { invariant. In other words, the URL returned will always have }
  380. { the same base as the URL supplied as an argument. }
  381. function CFURLCreateCopyAppendingPathComponent( allocator: CFAllocatorRef; url: CFURLRef; pathComponent: CFStringRef; isDirectory: Boolean ): CFURLRef; external name '_CFURLCreateCopyAppendingPathComponent';
  382. function CFURLCreateCopyDeletingLastPathComponent( allocator: CFAllocatorRef; url: CFURLRef ): CFURLRef; external name '_CFURLCreateCopyDeletingLastPathComponent';
  383. function CFURLCreateCopyAppendingPathExtension( allocator: CFAllocatorRef; url: CFURLRef; extension: CFStringRef ): CFURLRef; external name '_CFURLCreateCopyAppendingPathExtension';
  384. function CFURLCreateCopyDeletingPathExtension( allocator: CFAllocatorRef; url: CFURLRef ): CFURLRef; external name '_CFURLCreateCopyDeletingPathExtension';
  385. {#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
  386. { Fills buffer with the bytes for url, returning the number of bytes }
  387. { filled. If buffer is of insufficient size, returns -1 and no bytes }
  388. { are placed in buffer. If buffer is NULL, the needed length is }
  389. { computed and returned. The returned bytes are the original bytes }
  390. { from which the URL was created; if the URL was created from a }
  391. { string, the bytes will be the bytes of the string encoded via UTF-8 }
  392. function CFURLGetBytes( url: CFURLRef; buffer: CStringPtr; bufferLength: CFIndex ): CFIndex; external name '_CFURLGetBytes';
  393. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  394. type
  395. CFURLComponentType = CFIndex;
  396. const
  397. kCFURLComponentScheme = 1;
  398. kCFURLComponentNetLocation = 2;
  399. kCFURLComponentPath = 3;
  400. kCFURLComponentResourceSpecifier = 4;
  401. kCFURLComponentUser = 5;
  402. kCFURLComponentPassword = 6;
  403. kCFURLComponentUserInfo = 7;
  404. kCFURLComponentHost = 8;
  405. kCFURLComponentPort = 9;
  406. kCFURLComponentParameterString = 10;
  407. kCFURLComponentQuery = 11;
  408. kCFURLComponentFragment = 12;
  409. {
  410. Gets the range of the requested component in the bytes of url, as
  411. returned by CFURLGetBytes(). This range is only good for use in the
  412. bytes returned by CFURLGetBytes!
  413. If non-NULL, rangeIncludingSeparators gives the range of component
  414. including the sequences that separate component from the previous and
  415. next components. If there is no previous or next component, that end of
  416. rangeIncludingSeparators will match the range of the component itself.
  417. If url does not contain the given component type, (kCFNotFound, 0) is
  418. returned, and rangeIncludingSeparators is set to the location where the
  419. component would be inserted. Some examples -
  420. For the URL http://www.apple.com/hotnews/
  421. Component returned range rangeIncludingSeparators
  422. scheme (0, 4) (0, 7)
  423. net location (7, 13) (4, 16)
  424. path (20, 9) (20, 9)
  425. resource specifier (kCFNotFound, 0) (29, 0)
  426. user (kCFNotFound, 0) (7, 0)
  427. password (kCFNotFound, 0) (7, 0)
  428. user info (kCFNotFound, 0) (7, 0)
  429. host (7, 13) (4, 16)
  430. port (kCFNotFound, 0) (20, 0)
  431. parameter (kCFNotFound, 0) (29, 0)
  432. query (kCFNotFound, 0) (29, 0)
  433. fragment (kCFNotFound, 0) (29, 0)
  434. For the URL ./relPath/file.html#fragment
  435. Component returned range rangeIncludingSeparators
  436. scheme (kCFNotFound, 0) (0, 0)
  437. net location (kCFNotFound, 0) (0, 0)
  438. path (0, 19) (0, 20)
  439. resource specifier (20, 8) (19, 9)
  440. user (kCFNotFound, 0) (0, 0)
  441. password (kCFNotFound, 0) (0, 0)
  442. user info (kCFNotFound, 0) (0, 0)
  443. host (kCFNotFound, 0) (0, 0)
  444. port (kCFNotFound, 0) (0, 0)
  445. parameter (kCFNotFound, 0) (19, 0)
  446. query (kCFNotFound, 0) (19, 0)
  447. fragment (20, 8) (19, 9)
  448. For the URL scheme://user:pass@host:1/path/path2/file.html;params?query#fragment
  449. Component returned range rangeIncludingSeparators
  450. scheme (0, 6) (0, 9)
  451. net location (9, 16) (6, 19)
  452. path (25, 21) (25, 22)
  453. resource specifier (47, 21) (46, 22)
  454. user (9, 4) (6, 8)
  455. password (14, 4) (13, 6)
  456. user info (9, 9) (6, 13)
  457. host (19, 4) (18, 6)
  458. port (24, 1) (23, 2)
  459. parameter (47, 6) (46, 8)
  460. query (54, 5) (53, 7)
  461. fragment (60, 8) (59, 9)
  462. }
  463. function CFURLGetByteRangeForComponent( url: CFURLRef; component: CFURLComponentType; var rangeIncludingSeparators: CFRange ): CFRange; external name '_CFURLGetByteRangeForComponent';
  464. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  465. {#endif}
  466. { Returns a string with any percent escape sequences that do NOT }
  467. { correspond to characters in charactersToLeaveEscaped with their }
  468. { equivalent. Returns NULL on failure (if an invalid percent sequence }
  469. { is encountered), or the original string (retained) if no characters }
  470. { need to be replaced. Pass NULL to request that no percent escapes be }
  471. { replaced, or the empty string (CFSTR("")) to request that all percent }
  472. { escapes be replaced. Uses UTF8 to interpret percent escapes. }
  473. function CFURLCreateStringByReplacingPercentEscapes( allocator: CFAllocatorRef; originalString: CFStringRef; charactersToLeaveEscaped: CFStringRef ): CFStringRef; external name '_CFURLCreateStringByReplacingPercentEscapes';
  474. {#if MAC_OS_X_VERSION_10_3 <= MAC_OS_X_VERSION_MAX_ALLOWED}
  475. { As above, but allows you to specify the encoding to use when interpreting percent escapes }
  476. function CFURLCreateStringByReplacingPercentEscapesUsingEncoding( allocator: CFAllocatorRef; origString: CFStringRef; charsToLeaveEscaped: CFStringRef; encoding: CFStringEncoding ): CFStringRef; external name '_CFURLCreateStringByReplacingPercentEscapesUsingEncoding';
  477. (* AVAILABLE_MAC_OS_X_VERSION_10_3_AND_LATER *)
  478. {#endif}
  479. { Creates a copy or originalString, replacing certain characters with }
  480. { the equivalent percent escape sequence based on the encoding specified. }
  481. { If the originalString does not need to be modified (no percent escape }
  482. { sequences are missing), may retain and return originalString. }
  483. { If you are uncertain of the correct encoding, you should use UTF-8, }
  484. { which is the encoding designated by RFC 2396 as the correct encoding }
  485. { for use in URLs. The characters so escaped are all characters that }
  486. { are not legal URL characters (based on RFC 2396), plus any characters }
  487. { in legalURLCharactersToBeEscaped, less any characters in }
  488. { charactersToLeaveUnescaped. To simply correct any non-URL characters }
  489. { in an otherwise correct URL string, do: }
  490. { newString = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, origString, NULL, NULL, kCFStringEncodingUTF8); }
  491. function CFURLCreateStringByAddingPercentEscapes( allocator: CFAllocatorRef; originalString: CFStringRef; charactersToLeaveUnescaped: CFStringRef; legalURLCharactersToBeEscaped: CFStringRef; encoding: CFStringEncoding ): CFStringRef; external name '_CFURLCreateStringByAddingPercentEscapes';
  492. { #if (TARGET_OS_MAC || TARGET_OS_EMBEDDED || TARGET_OS_IPHONE) || CF_BUILDING_CF || NSBUILDINGFOUNDATION }
  493. { CF_IMPLICIT_BRIDGING_DISABLED }
  494. {
  495. CFURLIsFileReferenceURL
  496. Returns whether the URL is a file reference URL.
  497. Parameters
  498. url
  499. The URL specifying the resource.
  500. }
  501. function CFURLIsFileReferenceURL( url: CFURLRef ): Boolean; external name '_CFURLIsFileReferenceURL';
  502. (* CF_AVAILABLE_STARTING(10_9, 7_0) *)
  503. {
  504. CFURLCreateFileReferenceURL
  505. Returns a new file reference URL that refers to the same resource as a specified URL.
  506. Parameters
  507. allocator
  508. The memory allocator for creating the new URL.
  509. url
  510. The file URL specifying the resource.
  511. error
  512. On output when the result is NULL, the error that occurred. This parameter is optional; if you do not wish the error returned, pass NULL here. The caller is responsible for releasing a valid output error.
  513. Return Value
  514. The new file reference URL, or NULL if an error occurs.
  515. Discussion
  516. File reference URLs use a URL path syntax that identifies a file system object by reference, not by path. This form of file URL remains valid when the file system path of the URL’s underlying resource changes. An error will occur if the url parameter is not a file URL. File reference URLs cannot be created to file system objects which do not exist or are not reachable. In some areas of the file system hierarchy, file reference URLs cannot be generated to the leaf node of the URL path. A file reference URL's path should never be persistently stored because is not valid across system restarts, and across remounts of volumes -- if you want to create a persistent reference to a file system object, use a bookmark (see CFURLCreateBookmarkData). If this function returns NULL, the optional error is populated. This function is currently applicable only to URLs for file system resources.
  517. Symbol is present in iOS 4, but performs no operation.
  518. }
  519. function CFURLCreateFileReferenceURL( allocator: CFAllocatorRef; url: CFURLRef; var error: CFErrorRef ): CFURLRef; external name '_CFURLCreateFileReferenceURL';
  520. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  521. {
  522. CFURLCreateFilePathURL
  523. Returns a new file path URL that refers to the same resource as a specified URL.
  524. Parameters
  525. allocator
  526. The memory allocator for creating the new URL.
  527. url
  528. The file URL specifying the resource.
  529. error
  530. On output when the result is NULL, the error that occurred. This parameter is optional; if you do not wish the error returned, pass NULL here. The caller is responsible for releasing a valid output error.
  531. Return Value
  532. The new file path URL, or NULL if an error occurs.
  533. Discussion
  534. File path URLs use a file system style path. An error will occur if the url parameter is not a file URL. A file reference URL's resource must exist and be reachable to be converted to a file path URL. If this function returns NULL, the optional error is populated. This function is currently applicable only to URLs for file system resources.
  535. Symbol is present in iOS 4, but performs no operation.
  536. }
  537. function CFURLCreateFilePathURL( allocator: CFAllocatorRef; url: CFURLRef; var error: CFErrorRef ): CFURLRef; external name '_CFURLCreateFilePathURL';
  538. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  539. { CF_IMPLICIT_BRIDGING_ENABLED }
  540. {#ifndef CF_OPEN_SOURCE}
  541. // Note: CFURLCreateFromFSRef and CFURLGetFSRef have never been functional on iOS because the Carbon File Manager is not on iOS.
  542. {$ifc TARGET_OS_MAC}
  543. function CFURLCreateFromFSRef( allocator: CFAllocatorRef; const (*var*) fsRef_: FSRef ): CFURLRef; external name '_CFURLCreateFromFSRef';
  544. (* CF_DEPRECATED(10_0, 10_9, 2_0, 7_0) *)
  545. function CFURLGetFSRef( url: CFURLRef; var fsRef_: FSRef ): Boolean; external name '_CFURLGetFSRef';
  546. (* CF_DEPRECATED(10_0, 10_9, 2_0, 7_0) *)
  547. {$endc} {TARGET_OS_MAC}
  548. {#endif} // !CF_OPEN_SOURCE
  549. { Resource access
  550. The behavior of resource value caching is slightly different between the NSURL and CFURL API.
  551. When the NSURL methods which get, set, or use cached resource values are used from the main thread, resource values cached by the URL (except those added as temporary properties) are invalidated the next time the main thread's run loop runs.
  552. The CFURL functions do not automatically clear any resource values cached by the URL. The client has complete control over the cache lifetime. If you are using CFURL API, you must use CFURLClearResourcePropertyCacheForKey or CFURLClearResourcePropertyCache to clear cached resource values.
  553. }
  554. {
  555. CFURLCopyResourcePropertyForKey
  556. Returns the resource value identified by a given resource key.
  557. Parameters
  558. url
  559. The URL specifying the resource.
  560. key
  561. The resource key that identifies the resource property.
  562. propertyValueTypeRefPtr
  563. On output when the result is true, the resource value or NULL.
  564. error
  565. On output when the result is false, the error that occurred. This parameter is optional; if you do not wish the error returned, pass NULL here. The caller is responsible for releasing a valid output error.
  566. Return Value
  567. true if propertyValueTypeRefPtr is successfully populated; false if an error occurs.
  568. Discussion
  569. CFURLCopyResourcePropertyForKey first checks if the URL object already caches the resource value. If so, it returns the cached resource value to the caller. If not, then CFURLCopyResourcePropertyForKey synchronously obtains the resource value from the backing store, adds the resource value to the URL object's cache, and returns the resource value to the caller. The type of the resource value varies by resource property (see resource key definitions). If this function returns true and propertyValueTypeRefPtr is populated with NULL, it means the resource property is not available for the specified resource and no errors occurred when determining the resource property was not available. If this function returns false, the optional error is populated. This function is currently applicable only to URLs for file system resources.
  570. Symbol is present in iOS 4, but performs no operation.
  571. }
  572. function CFURLCopyResourcePropertyForKey( url: CFURLRef; key: CFStringRef; propertyValueTypeRefPtr: UnivPtr; error: CFErrorRefPtr ): Boolean; external name '_CFURLCopyResourcePropertyForKey';
  573. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  574. {
  575. CFURLCopyResourcePropertiesForKeys
  576. Returns the resource values identified by specified array of resource keys.
  577. Parameters
  578. url
  579. The URL specifying the resource.
  580. keys
  581. An array of resource keys that identify the resource properties.
  582. error
  583. On output when the result is NULL, the error that occurred. This parameter is optional; if you do not wish the error returned, pass NULL here. The caller is responsible for releasing a valid output error.
  584. Return Value
  585. A dictionary of resource values indexed by resource key; NULL if an error occurs.
  586. Discussion
  587. CFURLCopyResourcePropertiesForKeys first checks if the URL object already caches the resource values. If so, it returns the cached resource values to the caller. If not, then CFURLCopyResourcePropertyForKey synchronously obtains the resource values from the backing store, adds the resource values to the URL object's cache, and returns the resource values to the caller. The type of the resource values vary by property (see resource key definitions). If the result dictionary does not contain a resource value for one or more of the requested resource keys, it means those resource properties are not available for the specified resource and no errors occurred when determining those resource properties were not available. If this function returns NULL, the optional error is populated. This function is currently applicable only to URLs for file system resources.
  588. Symbol is present in iOS 4, but performs no operation.
  589. }
  590. function CFURLCopyResourcePropertiesForKeys( url: CFURLRef; keys: CFArrayRef; error: CFErrorRefPtr ): CFDictionaryRef; external name '_CFURLCopyResourcePropertiesForKeys';
  591. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  592. {
  593. CFURLSetResourcePropertyForKey
  594. Sets the resource value identified by a given resource key.
  595. Parameters
  596. url
  597. The URL specifying the resource.
  598. key
  599. The resource key that identifies the resource property.
  600. propertyValue
  601. The resource value.
  602. error
  603. On output when the result is false, the error that occurred. This parameter is optional; if you do not wish the error returned, pass NULL here. The caller is responsible for releasing a valid output error.
  604. Return Value
  605. true if the attempt to set the resource value completed with no errors; otherwise, false.
  606. Discussion
  607. CFURLSetResourcePropertyForKey writes the new resource value out to the backing store. Attempts to set a read-only resource property or to set a resource property not supported by the resource are ignored and are not considered errors. If this function returns false, the optional error is populated. This function is currently applicable only to URLs for file system resources.
  608. Symbol is present in iOS 4, but performs no operation.
  609. }
  610. function CFURLSetResourcePropertyForKey( url: CFURLRef; key: CFStringRef; propertyValue: CFTypeRef; error: CFErrorRefPtr ): Boolean; external name '_CFURLSetResourcePropertyForKey';
  611. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  612. {
  613. CFURLSetResourcePropertiesForKeys
  614. Sets any number of resource values of a URL's resource.
  615. Parameters
  616. url
  617. The URL specifying the resource.
  618. keyedPropertyValues
  619. A dictionary of resource values indexed by resource keys.
  620. error
  621. On output when the result is false, the error that occurred. This parameter is optional; if you do not wish the error returned, pass NULL here. The caller is responsible for releasing a valid output error.
  622. Return Value
  623. true if the attempt to set the resource values completed with no errors; otherwise, false.
  624. Discussion
  625. CFURLSetResourcePropertiesForKeys writes the new resource values out to the backing store. Attempts to set read-only resource properties or to set resource properties not supported by the resource are ignored and are not considered errors. If an error occurs after some resource properties have been successfully changed, the userInfo dictionary in the returned error contains an array of resource keys that were not set with the key kCFURLKeysOfUnsetValuesKey. The order in which the resource values are set is not defined. If you need to guarantee the order resource values are set, you should make multiple requests to CFURLSetResourcePropertiesForKeys or CFURLSetResourcePropertyForKey to guarantee the order. If this function returns false, the optional error is populated. This function is currently applicable only to URLs for file system resources.
  626. Symbol is present in iOS 4, but performs no operation.
  627. }
  628. function CFURLSetResourcePropertiesForKeys( url: CFURLRef; keyedPropertyValues: CFDictionaryRef; error: CFErrorRefPtr ): Boolean; external name '_CFURLSetResourcePropertiesForKeys';
  629. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  630. var kCFURLKeysOfUnsetValuesKey: CFStringRef; external name '_kCFURLKeysOfUnsetValuesKey'; (* attribute const *)
  631. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  632. { Key for the resource properties that have not been set after the CFURLSetResourcePropertiesForKeys function returns an error, returned as an array of of CFString objects. }
  633. {
  634. CFURLClearResourcePropertyCacheForKey
  635. Discards a cached resource value of a URL.
  636. Parameters
  637. url
  638. The URL specifying the resource.
  639. key
  640. The resource key that identifies the resource property.
  641. Discussion
  642. Discarding a cached resource value may discard other cached resource values, because some resource values are cached as a set of values and because some resource values depend on other resource values (temporary properties have no dependencies). This function is currently applicable only to URLs for file system resources.
  643. Symbol is present in iOS 4, but performs no operation.
  644. }
  645. procedure CFURLClearResourcePropertyCacheForKey( url: CFURLRef; key: CFStringRef ); external name '_CFURLClearResourcePropertyCacheForKey';
  646. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  647. {
  648. CFURLClearResourcePropertyCache
  649. Discards all cached resource values of a URL.
  650. Parameters
  651. url
  652. The URL specifying the resource.
  653. Discussion
  654. All temporary properties are also cleared from the URL object's cache. This function is currently applicable only to URLs for file system resources.
  655. Symbol is present in iOS 4, but performs no operation.
  656. }
  657. procedure CFURLClearResourcePropertyCache( url: CFURLRef ); external name '_CFURLClearResourcePropertyCache';
  658. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  659. {
  660. CFURLSetTemporaryResourcePropertyForKey
  661. Sets a temporary resource value on the URL object.
  662. Parameters
  663. url
  664. The URL object.
  665. key
  666. The resource key that identifies the temporary resource property.
  667. propertyValue
  668. The resource value.
  669. Discussion
  670. Temporary properties are for client use. Temporary properties exist only in memory and are never written to the resource's backing store. Once set, a temporary value can be copied from the URL object with CFURLCopyResourcePropertyForKey and CFURLCopyResourcePropertiesForKeys. To remove a temporary value from the URL object, use CFURLClearResourcePropertyCacheForKey. Temporary values must be valid Core Foundation types, and will be retained by CFURLSetTemporaryResourcePropertyForKey. Care should be taken to ensure the key that identifies a temporary resource property is unique and does not conflict with system defined keys (using reverse domain name notation in your temporary resource property keys is recommended). This function is currently applicable only to URLs for file system resources.
  671. Symbol is present in iOS 4, but performs no operation.
  672. }
  673. procedure CFURLSetTemporaryResourcePropertyForKey( url: CFURLRef; key: CFStringRef; propertyValue: CFTypeRef ); external name '_CFURLSetTemporaryResourcePropertyForKey';
  674. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  675. {
  676. CFURLResourceIsReachable
  677. Returns whether the URL's resource exists and is reachable.
  678. Parameters
  679. url
  680. The URL object.
  681. error
  682. On output when the result is false, the error that occurred. This parameter is optional; if you do not wish the error returned, pass NULL here. The caller is responsible for releasing a valid output error.
  683. Return Value
  684. true if the resource is reachable; otherwise, false.
  685. Discussion
  686. CFURLResourceIsReachable synchronously checks if the resource's backing store is reachable. Checking reachability is appropriate when making decisions that do not require other immediate operations on the resource, e.g. periodic maintenance of UI state that depends on the existence of a specific document. When performing operations such as opening a file or copying resource properties, it is more efficient to simply try the operation and handle failures. This function is currently applicable only to URLs for file system resources. If this function returns false, the optional error is populated. For other URL types, false is returned.
  687. Symbol is present in iOS 4, but performs no operation.
  688. }
  689. function CFURLResourceIsReachable( url: CFURLRef; error: CFErrorRefPtr ): Boolean; external name '_CFURLResourceIsReachable';
  690. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  691. { CF_IMPLICIT_BRIDGING_ENABLED }
  692. { Properties of File System Resources }
  693. var kCFURLNameKey: CFStringRef; external name '_kCFURLNameKey'; (* attribute const *)
  694. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  695. { The resource name provided by the file system (Read-write, value type CFString) }
  696. var kCFURLLocalizedNameKey: CFStringRef; external name '_kCFURLLocalizedNameKey'; (* attribute const *)
  697. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  698. { Localized or extension-hidden name as displayed to users (Read-only, value type CFString) }
  699. var kCFURLIsRegularFileKey: CFStringRef; external name '_kCFURLIsRegularFileKey'; (* attribute const *)
  700. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  701. { True for regular files (Read-only, value type CFBoolean) }
  702. var kCFURLIsDirectoryKey: CFStringRef; external name '_kCFURLIsDirectoryKey'; (* attribute const *)
  703. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  704. { True for directories (Read-only, CFBoolean) }
  705. var kCFURLIsSymbolicLinkKey: CFStringRef; external name '_kCFURLIsSymbolicLinkKey'; (* attribute const *)
  706. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  707. { True for symlinks (Read-only, value type CFBoolean) }
  708. var kCFURLIsVolumeKey: CFStringRef; external name '_kCFURLIsVolumeKey'; (* attribute const *)
  709. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  710. { True for the root directory of a volume (Read-only, value type CFBoolean) }
  711. var kCFURLIsPackageKey: CFStringRef; external name '_kCFURLIsPackageKey'; (* attribute const *)
  712. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  713. { True for packaged directories (Read-only 10_6 and 10_7, read-write 10_8, value type CFBoolean). Note: You can only set or clear this property on directories; if you try to set this property on non-directory objects, the property is ignored. If the directory is a package for some other reason (extension type, etc), setting this property to false will have no effect. }
  714. var kCFURLIsSystemImmutableKey: CFStringRef; external name '_kCFURLIsSystemImmutableKey'; (* attribute const *)
  715. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  716. { True for system-immutable resources (Read-write, value type CFBoolean) }
  717. var kCFURLIsUserImmutableKey: CFStringRef; external name '_kCFURLIsUserImmutableKey'; (* attribute const *)
  718. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  719. { True for user-immutable resources (Read-write, value type CFBoolean) }
  720. var kCFURLIsHiddenKey: CFStringRef; external name '_kCFURLIsHiddenKey'; (* attribute const *)
  721. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  722. { True for resources normally not displayed to users (Read-write, value type CFBoolean). Note: If the resource is a hidden because its name starts with a period, setting this property to false will not change the property. }
  723. var kCFURLHasHiddenExtensionKey: CFStringRef; external name '_kCFURLHasHiddenExtensionKey'; (* attribute const *)
  724. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  725. { True for resources whose filename extension is removed from the localized name property (Read-write, value type CFBoolean) }
  726. var kCFURLCreationDateKey: CFStringRef; external name '_kCFURLCreationDateKey'; (* attribute const *)
  727. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  728. { The date the resource was created (Read-write, value type CFDate) }
  729. var kCFURLContentAccessDateKey: CFStringRef; external name '_kCFURLContentAccessDateKey'; (* attribute const *)
  730. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  731. { The date the resource was last accessed (Read-only, value type CFDate) }
  732. var kCFURLContentModificationDateKey: CFStringRef; external name '_kCFURLContentModificationDateKey'; (* attribute const *)
  733. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  734. { The time the resource content was last modified (Read-write, value type CFDate) }
  735. var kCFURLAttributeModificationDateKey: CFStringRef; external name '_kCFURLAttributeModificationDateKey'; (* attribute const *)
  736. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  737. { The time the resource's attributes were last modified (Read-write, value type CFDate) }
  738. var kCFURLLinkCountKey: CFStringRef; external name '_kCFURLLinkCountKey'; (* attribute const *)
  739. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  740. { Number of hard links to the resource (Read-only, value type CFNumber) }
  741. var kCFURLParentDirectoryURLKey: CFStringRef; external name '_kCFURLParentDirectoryURLKey'; (* attribute const *)
  742. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  743. { The resource's parent directory, if any (Read-only, value type CFURL) }
  744. var kCFURLVolumeURLKey: CFStringRef; external name '_kCFURLVolumeURLKey'; (* attribute const *)
  745. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  746. { URL of the volume on which the resource is stored (Read-only, value type CFURL) }
  747. var kCFURLTypeIdentifierKey: CFStringRef; external name '_kCFURLTypeIdentifierKey'; (* attribute const *)
  748. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  749. { Uniform type identifier (UTI) for the resource (Read-only, value type CFString) }
  750. var kCFURLLocalizedTypeDescriptionKey: CFStringRef; external name '_kCFURLLocalizedTypeDescriptionKey'; (* attribute const *)
  751. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  752. { User-visible type or "kind" description (Read-only, value type CFString) }
  753. var kCFURLLabelNumberKey: CFStringRef; external name '_kCFURLLabelNumberKey'; (* attribute const *)
  754. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  755. { The label number assigned to the resource (Read-write, value type CFNumber) }
  756. var kCFURLLabelColorKey: CFStringRef; external name '_kCFURLLabelColorKey'; (* attribute const *)
  757. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  758. { The color of the assigned label (Currently not implemented, value type CGColorRef, must link with Application Services) }
  759. var kCFURLLocalizedLabelKey: CFStringRef; external name '_kCFURLLocalizedLabelKey'; (* attribute const *)
  760. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  761. { The user-visible label text (Read-only, value type CFString) }
  762. var kCFURLEffectiveIconKey: CFStringRef; external name '_kCFURLEffectiveIconKey'; (* attribute const *)
  763. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  764. { The icon normally displayed for the resource (Read-only, value type CGImageRef, must link with Application Services) }
  765. var kCFURLCustomIconKey: CFStringRef; external name '_kCFURLCustomIconKey'; (* attribute const *)
  766. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  767. { The custom icon assigned to the resource, if any (Currently not implemented, value type CGImageRef, must link with Application Services) }
  768. var kCFURLFileResourceIdentifierKey: CFStringRef; external name '_kCFURLFileResourceIdentifierKey'; (* attribute const *)
  769. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  770. { An identifier which can be used to compare two file system objects for equality using CFEqual (i.e, two object identifiers are equal if they have the same file system path or if the paths are linked to same inode on the same file system). This identifier is not persistent across system restarts. (Read-only, value type CFType) }
  771. var kCFURLVolumeIdentifierKey: CFStringRef; external name '_kCFURLVolumeIdentifierKey'; (* attribute const *)
  772. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  773. { An identifier that can be used to identify the volume the file system object is on. Other objects on the same volume will have the same volume identifier and can be compared using for equality using CFEqual. This identifier is not persistent across system restarts. (Read-only, value type CFType) }
  774. var kCFURLPreferredIOBlockSizeKey: CFStringRef; external name '_kCFURLPreferredIOBlockSizeKey'; (* attribute const *)
  775. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  776. { The optimal block size when reading or writing this file's data, or NULL if not available. (Read-only, value type CFNumber) }
  777. var kCFURLIsReadableKey: CFStringRef; external name '_kCFURLIsReadableKey'; (* attribute const *)
  778. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  779. { true if this process (as determined by EUID) can read the resource. (Read-only, value type CFBoolean) }
  780. var kCFURLIsWritableKey: CFStringRef; external name '_kCFURLIsWritableKey'; (* attribute const *)
  781. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  782. { true if this process (as determined by EUID) can write to the resource. (Read-only, value type CFBoolean) }
  783. var kCFURLIsExecutableKey: CFStringRef; external name '_kCFURLIsExecutableKey'; (* attribute const *)
  784. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  785. { true if this process (as determined by EUID) can execute a file resource or search a directory resource. (Read-only, value type CFBoolean) }
  786. var kCFURLFileSecurityKey: CFStringRef; external name '_kCFURLFileSecurityKey'; (* attribute const *)
  787. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  788. { The file system object's security information encapsulated in a CFFileSecurity object. (Read-write, value type CFFileSecurity) }
  789. var kCFURLIsExcludedFromBackupKey: CFStringRef; external name '_kCFURLIsExcludedFromBackupKey'; (* attribute const *)
  790. (* CF_AVAILABLE_STARTING(10_8, 5_1) *)
  791. { true if resource should be excluded from backups, false otherwise (Read-write, value type CFBoolean). This property is only useful for excluding cache and other application support files which are not needed in a backup. Some operations commonly made to user documents will cause this property to be reset to false and so this property should not be used on user documents. }
  792. var kCFURLTagNamesKey: CFStringRef; external name '_kCFURLTagNamesKey'; (* attribute const *)
  793. (* CF_AVAILABLE_STARTING(10_9, NA) *)
  794. { The array of Tag names (Read-write, value type CFArray of CFString) }
  795. var kCFURLPathKey: CFStringRef; external name '_kCFURLPathKey'; (* attribute const *)
  796. (* CF_AVAILABLE_STARTING(10_8, 6_0) *)
  797. { the URL's path as a file system path (Read-only, value type CFString) }
  798. var kCFURLIsMountTriggerKey: CFStringRef; external name '_kCFURLIsMountTriggerKey'; (* attribute const *)
  799. (* CF_AVAILABLE_STARTING(10_7, 4_0) *)
  800. { true if this URL is a file system trigger directory. Traversing or opening a file system trigger will cause an attempt to mount a file system on the trigger directory. (Read-only, value type CFBoolean) }
  801. var kCFURLFileResourceTypeKey: CFStringRef; external name '_kCFURLFileResourceTypeKey'; (* attribute const *)
  802. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  803. { Returns the file system object type. (Read-only, value type CFString) }
  804. { The file system object type values returned for the kCFURLFileResourceTypeKey }
  805. var kCFURLFileResourceTypeNamedPipe: CFStringRef; external name '_kCFURLFileResourceTypeNamedPipe'; (* attribute const *)
  806. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  807. var kCFURLFileResourceTypeCharacterSpecial: CFStringRef; external name '_kCFURLFileResourceTypeCharacterSpecial'; (* attribute const *)
  808. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  809. var kCFURLFileResourceTypeDirectory: CFStringRef; external name '_kCFURLFileResourceTypeDirectory'; (* attribute const *)
  810. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  811. var kCFURLFileResourceTypeBlockSpecial: CFStringRef; external name '_kCFURLFileResourceTypeBlockSpecial'; (* attribute const *)
  812. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  813. var kCFURLFileResourceTypeRegular: CFStringRef; external name '_kCFURLFileResourceTypeRegular'; (* attribute const *)
  814. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  815. var kCFURLFileResourceTypeSymbolicLink: CFStringRef; external name '_kCFURLFileResourceTypeSymbolicLink'; (* attribute const *)
  816. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  817. var kCFURLFileResourceTypeSocket: CFStringRef; external name '_kCFURLFileResourceTypeSocket'; (* attribute const *)
  818. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  819. var kCFURLFileResourceTypeUnknown: CFStringRef; external name '_kCFURLFileResourceTypeUnknown'; (* attribute const *)
  820. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  821. { File Properties }
  822. var kCFURLFileSizeKey: CFStringRef; external name '_kCFURLFileSizeKey'; (* attribute const *)
  823. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  824. { Total file size in bytes (Read-only, value type CFNumber) }
  825. var kCFURLFileAllocatedSizeKey: CFStringRef; external name '_kCFURLFileAllocatedSizeKey'; (* attribute const *)
  826. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  827. { Total size allocated on disk for the file in bytes (number of blocks times block size) (Read-only, value type CFNumber) }
  828. var kCFURLTotalFileSizeKey: CFStringRef; external name '_kCFURLTotalFileSizeKey'; (* attribute const *)
  829. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  830. { Total displayable size of the file in bytes (this may include space used by metadata), or NULL if not available. (Read-only, value type CFNumber) }
  831. var kCFURLTotalFileAllocatedSizeKey: CFStringRef; external name '_kCFURLTotalFileAllocatedSizeKey'; (* attribute const *)
  832. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  833. { Total allocated size of the file in bytes (this may include space used by metadata), or NULL if not available. This can be less than the value returned by kCFURLTotalFileSizeKey if the resource is compressed. (Read-only, value type CFNumber) }
  834. var kCFURLIsAliasFileKey: CFStringRef; external name '_kCFURLIsAliasFileKey'; (* attribute const *)
  835. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  836. { true if the resource is a Finder alias file or a symlink, false otherwise ( Read-only, value type CFBooleanRef) }
  837. { Volume Properties }
  838. { As a convenience, volume properties can be requested from any file system URL. The value returned will reflect the property value for the volume on which the resource is located. }
  839. var kCFURLVolumeLocalizedFormatDescriptionKey: CFStringRef; external name '_kCFURLVolumeLocalizedFormatDescriptionKey'; (* attribute const *)
  840. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  841. { The user-visible volume format (Read-only, value type CFString) }
  842. var kCFURLVolumeTotalCapacityKey: CFStringRef; external name '_kCFURLVolumeTotalCapacityKey'; (* attribute const *)
  843. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  844. { Total volume capacity in bytes (Read-only, value type CFNumber) }
  845. var kCFURLVolumeAvailableCapacityKey: CFStringRef; external name '_kCFURLVolumeAvailableCapacityKey'; (* attribute const *)
  846. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  847. { Total free space in bytes (Read-only, value type CFNumber) }
  848. var kCFURLVolumeResourceCountKey: CFStringRef; external name '_kCFURLVolumeResourceCountKey'; (* attribute const *)
  849. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  850. { Total number of resources on the volume (Read-only, value type CFNumber) }
  851. var kCFURLVolumeSupportsPersistentIDsKey: CFStringRef; external name '_kCFURLVolumeSupportsPersistentIDsKey'; (* attribute const *)
  852. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  853. { true if the volume format supports persistent object identifiers and can look up file system objects by their IDs (Read-only, value type CFBoolean) }
  854. var kCFURLVolumeSupportsSymbolicLinksKey: CFStringRef; external name '_kCFURLVolumeSupportsSymbolicLinksKey'; (* attribute const *)
  855. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  856. { true if the volume format supports symbolic links (Read-only, value type CFBoolean) }
  857. var kCFURLVolumeSupportsHardLinksKey: CFStringRef; external name '_kCFURLVolumeSupportsHardLinksKey'; (* attribute const *)
  858. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  859. { true if the volume format supports hard links (Read-only, value type CFBoolean) }
  860. var kCFURLVolumeSupportsJournalingKey: CFStringRef; external name '_kCFURLVolumeSupportsJournalingKey'; (* attribute const *)
  861. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  862. { true if the volume format supports a journal used to speed recovery in case of unplanned restart (such as a power outage or crash). This does not necessarily mean the volume is actively using a journal. (Read-only, value type CFBoolean) }
  863. var kCFURLVolumeIsJournalingKey: CFStringRef; external name '_kCFURLVolumeIsJournalingKey'; (* attribute const *)
  864. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  865. { true if the volume is currently using a journal for speedy recovery after an unplanned restart. (Read-only, value type CFBoolean) }
  866. var kCFURLVolumeSupportsSparseFilesKey: CFStringRef; external name '_kCFURLVolumeSupportsSparseFilesKey'; (* attribute const *)
  867. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  868. { true if the volume format supports sparse files, that is, files which can have 'holes' that have never been written to, and thus do not consume space on disk. A sparse file may have an allocated size on disk that is less than its logical length. (Read-only, value type CFBoolean) }
  869. var kCFURLVolumeSupportsZeroRunsKey: CFStringRef; external name '_kCFURLVolumeSupportsZeroRunsKey'; (* attribute const *)
  870. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  871. { For security reasons, parts of a file (runs) that have never been written to must appear to contain zeroes. true if the volume keeps track of allocated but unwritten runs of a file so that it can substitute zeroes without actually writing zeroes to the media. (Read-only, value type CFBoolean) }
  872. var kCFURLVolumeSupportsCaseSensitiveNamesKey: CFStringRef; external name '_kCFURLVolumeSupportsCaseSensitiveNamesKey'; (* attribute const *)
  873. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  874. { true if the volume format treats upper and lower case characters in file and directory names as different. Otherwise an upper case character is equivalent to a lower case character, and you can't have two names that differ solely in the case of the characters. (Read-only, value type CFBoolean) }
  875. var kCFURLVolumeSupportsCasePreservedNamesKey: CFStringRef; external name '_kCFURLVolumeSupportsCasePreservedNamesKey'; (* attribute const *)
  876. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  877. { true if the volume format preserves the case of file and directory names. Otherwise the volume may change the case of some characters (typically making them all upper or all lower case). (Read-only, value type CFBoolean) }
  878. var kCFURLVolumeSupportsRootDirectoryDatesKey: CFStringRef; external name '_kCFURLVolumeSupportsRootDirectoryDatesKey'; (* attribute const *)
  879. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  880. { true if the volume supports reliable storage of times for the root directory. (Read-only, value type CFBoolean) }
  881. var kCFURLVolumeSupportsVolumeSizesKey: CFStringRef; external name '_kCFURLVolumeSupportsVolumeSizesKey'; (* attribute const *)
  882. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  883. { true if the volume supports returning volume size values (kCFURLVolumeTotalCapacityKey and kCFURLVolumeAvailableCapacityKey). (Read-only, value type CFBoolean) }
  884. var kCFURLVolumeSupportsRenamingKey: CFStringRef; external name '_kCFURLVolumeSupportsRenamingKey'; (* attribute const *)
  885. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  886. { true if the volume can be renamed. (Read-only, value type CFBoolean) }
  887. var kCFURLVolumeSupportsAdvisoryFileLockingKey: CFStringRef; external name '_kCFURLVolumeSupportsAdvisoryFileLockingKey'; (* attribute const *)
  888. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  889. { true if the volume implements whole-file flock(2) style advisory locks, and the O_EXLOCK and O_SHLOCK flags of the open(2) call. (Read-only, value type CFBoolean) }
  890. var kCFURLVolumeSupportsExtendedSecurityKey: CFStringRef; external name '_kCFURLVolumeSupportsExtendedSecurityKey'; (* attribute const *)
  891. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  892. { true if the volume implements extended security (ACLs). (Read-only, value type CFBoolean) }
  893. var kCFURLVolumeIsBrowsableKey: CFStringRef; external name '_kCFURLVolumeIsBrowsableKey'; (* attribute const *)
  894. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  895. { true if the volume should be visible via the GUI (i.e., appear on the Desktop as a separate volume). (Read-only, value type CFBoolean) }
  896. var kCFURLVolumeMaximumFileSizeKey: CFStringRef; external name '_kCFURLVolumeMaximumFileSizeKey'; (* attribute const *)
  897. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  898. { The largest file size (in bytes) supported by this file system, or NULL if this cannot be determined. (Read-only, value type CFNumber) }
  899. var kCFURLVolumeIsEjectableKey: CFStringRef; external name '_kCFURLVolumeIsEjectableKey'; (* attribute const *)
  900. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  901. { true if the volume's media is ejectable from the drive mechanism under software control. (Read-only, value type CFBoolean) }
  902. var kCFURLVolumeIsRemovableKey: CFStringRef; external name '_kCFURLVolumeIsRemovableKey'; (* attribute const *)
  903. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  904. { true if the volume's media is removable from the drive mechanism. (Read-only, value type CFBoolean) }
  905. var kCFURLVolumeIsInternalKey: CFStringRef; external name '_kCFURLVolumeIsInternalKey'; (* attribute const *)
  906. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  907. { true if the volume's device is connected to an internal bus, false if connected to an external bus, or NULL if not available. (Read-only, value type CFBoolean) }
  908. var kCFURLVolumeIsAutomountedKey: CFStringRef; external name '_kCFURLVolumeIsAutomountedKey'; (* attribute const *)
  909. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  910. { true if the volume is automounted. Note: do not mistake this with the functionality provided by kCFURLVolumeSupportsBrowsingKey. (Read-only, value type CFBoolean) }
  911. var kCFURLVolumeIsLocalKey: CFStringRef; external name '_kCFURLVolumeIsLocalKey'; (* attribute const *)
  912. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  913. { true if the volume is stored on a local device. (Read-only, value type CFBoolean) }
  914. var kCFURLVolumeIsReadOnlyKey: CFStringRef; external name '_kCFURLVolumeIsReadOnlyKey'; (* attribute const *)
  915. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  916. { true if the volume is read-only. (Read-only, value type CFBoolean) }
  917. var kCFURLVolumeCreationDateKey: CFStringRef; external name '_kCFURLVolumeCreationDateKey'; (* attribute const *)
  918. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  919. { The volume's creation date, or NULL if this cannot be determined. (Read-only, value type CFDate) }
  920. var kCFURLVolumeURLForRemountingKey: CFStringRef; external name '_kCFURLVolumeURLForRemountingKey'; (* attribute const *)
  921. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  922. { The CFURL needed to remount a network volume, or NULL if not available. (Read-only, value type CFURL) }
  923. var kCFURLVolumeUUIDStringKey: CFStringRef; external name '_kCFURLVolumeUUIDStringKey'; (* attribute const *)
  924. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  925. { The volume's persistent UUID as a string, or NULL if a persistent UUID is not available for the volume. (Read-only, value type CFString) }
  926. var kCFURLVolumeNameKey: CFStringRef; external name '_kCFURLVolumeNameKey'; (* attribute const *)
  927. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  928. { The name of the volume (Read-write, settable if kCFURLVolumeSupportsRenamingKey is true and permissions allow, value type CFString) }
  929. var kCFURLVolumeLocalizedNameKey: CFStringRef; external name '_kCFURLVolumeLocalizedNameKey'; (* attribute const *)
  930. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  931. { The user-presentable name of the volume (Read-only, value type CFString) }
  932. { UbiquitousItem Properties }
  933. var kCFURLIsUbiquitousItemKey: CFStringRef; external name '_kCFURLIsUbiquitousItemKey'; (* attribute const *)
  934. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  935. { true if this item is synced to the cloud, false if it is only a local file. (Read-only, value type CFBoolean) }
  936. var kCFURLUbiquitousItemHasUnresolvedConflictsKey: CFStringRef; external name '_kCFURLUbiquitousItemHasUnresolvedConflictsKey'; (* attribute const *)
  937. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  938. { true if this item has conflicts outstanding. (Read-only, value type CFBoolean) }
  939. var kCFURLUbiquitousItemIsDownloadedKey: CFStringRef; external name '_kCFURLUbiquitousItemIsDownloadedKey'; (* attribute const *)
  940. (* CF_DEPRECATED(10_7, 10_9, 5_0, 7_0, "Use kCFURLUbiquitousItemDownloadingStatusKey instead") *)
  941. { Equivalent to NSURLUbiquitousItemDownloadingStatusKey == NSURLUbiquitousItemDownloadingStatusCurrent. Has never behaved as documented in earlier releases, hence deprecated. (Read-only, value type CFBoolean) }
  942. var kCFURLUbiquitousItemIsDownloadingKey: CFStringRef; external name '_kCFURLUbiquitousItemIsDownloadingKey'; (* attribute const *)
  943. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  944. { true if data is being downloaded for this item. (Read-only, value type CFBoolean) }
  945. var kCFURLUbiquitousItemIsUploadedKey: CFStringRef; external name '_kCFURLUbiquitousItemIsUploadedKey'; (* attribute const *)
  946. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  947. { true if there is data present in the cloud for this item. (Read-only, value type CFBoolean) }
  948. var kCFURLUbiquitousItemIsUploadingKey: CFStringRef; external name '_kCFURLUbiquitousItemIsUploadingKey'; (* attribute const *)
  949. (* CF_AVAILABLE_STARTING(10_7, 5_0) *)
  950. { true if data is being uploaded for this item. (Read-only, value type CFBoolean) }
  951. var kCFURLUbiquitousItemPercentDownloadedKey: CFStringRef; external name '_kCFURLUbiquitousItemPercentDownloadedKey'; (* attribute const *)
  952. (* CF_DEPRECATED(10_7, 10_8, 5_0, 6_0, "Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead") *)
  953. { Use NSMetadataQuery and NSMetadataUbiquitousItemPercentDownloadedKey on NSMetadataItem instead }
  954. var kCFURLUbiquitousItemPercentUploadedKey: CFStringRef; external name '_kCFURLUbiquitousItemPercentUploadedKey'; (* attribute const *)
  955. (* CF_DEPRECATED(10_7, 10_8, 5_0, 6_0, "Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead") *)
  956. { Use NSMetadataQuery and NSMetadataUbiquitousItemPercentUploadedKey on NSMetadataItem instead }
  957. var kCFURLUbiquitousItemDownloadingStatusKey: CFStringRef; external name '_kCFURLUbiquitousItemDownloadingStatusKey'; (* attribute const *)
  958. (* CF_AVAILABLE_STARTING(10_9, 7_0) *)
  959. { Returns the download status of this item. (Read-only, value type CFString). Possible values below. }
  960. var kCFURLUbiquitousItemDownloadingErrorKey: CFStringRef; external name '_kCFURLUbiquitousItemDownloadingErrorKey'; (* attribute const *)
  961. (* CF_AVAILABLE_STARTING(10_9, 7_0) *)
  962. { returns the error when downloading the item from iCloud failed. See the NSUbiquitousFile section in FoundationErrors.h. }
  963. var kCFURLUbiquitousItemUploadingErrorKey: CFStringRef; external name '_kCFURLUbiquitousItemUploadingErrorKey'; (* attribute const *)
  964. (* CF_AVAILABLE_STARTING(10_9, 7_0) *)
  965. { returns the error when uploading the item to iCloud failed. See the NSUbiquitousFile section in FoundationErrors.h. }
  966. { The values returned for kCFURLUbiquitousItemDownloadingStatusKey
  967. }
  968. var kCFURLUbiquitousItemDownloadingStatusNotDownloaded: CFStringRef; external name '_kCFURLUbiquitousItemDownloadingStatusNotDownloaded'; (* attribute const *)
  969. (* CF_AVAILABLE_STARTING(10_9, 7_0) *)
  970. { this item has not been downloaded yet. Use NSFileManager's startDownloadingUbiquitousItemAtURL:error: to download it }
  971. var kCFURLUbiquitousItemDownloadingStatusDownloaded: CFStringRef; external name '_kCFURLUbiquitousItemDownloadingStatusDownloaded'; (* attribute const *)
  972. (* CF_AVAILABLE_STARTING(10_9, 7_0) *)
  973. { there is a local version of this item available. The most current version will get downloaded as soon as possible. }
  974. var kCFURLUbiquitousItemDownloadingStatusCurrent: CFStringRef; external name '_kCFURLUbiquitousItemDownloadingStatusCurrent'; (* attribute const *)
  975. (* CF_AVAILABLE_STARTING(10_9, 7_0) *)
  976. { there is a local version of this item and it is the most up-to-date version known to this device. }
  977. type
  978. CFURLBookmarkCreationOptions = CFOptionFlags;
  979. const
  980. kCFURLBookmarkCreationPreferFileIDResolutionMask = 1 shl 8; { At resolution time, this alias will prefer resolving by the embedded fileID to the path }
  981. kCFURLBookmarkCreationMinimalBookmarkMask = 1 shl 9; { Creates a bookmark with "less" information, which may be smaller but still be able to resolve in certain ways }
  982. kCFURLBookmarkCreationSuitableForBookmarkFile = 1 shl 10; { includes in the created bookmark those properties which are needed for a bookmark/alias file }
  983. {$ifc TARGET_OS_MAC}
  984. kCFURLBookmarkCreationWithSecurityScope = 1 shl 11; (* CF_AVAILABLE_STARTING(10_7,NA) *) { Mac OS X 10.7.3 and later, include information in the bookmark data which allows the same sandboxed process to access the resource after being relaunched }
  985. kCFURLBookmarkCreationSecurityScopeAllowOnlyReadAccess = 1 shl 12; (* CF_AVAILABLE_STARTING(10_7,NA) *) { Mac OS X 10.7.3 and later, if used with kCFURLBookmarkCreationWithSecurityScope, at resolution time only read access to the resource will be granted }
  986. {$endc}
  987. const
  988. kCFBookmarkResolutionWithoutUIMask = 1 shl 8; { don't perform any UI during bookmark resolution }
  989. kCFBookmarkResolutionWithoutMountingMask = 1 shl 9 ; { don't mount a volume during bookmark resolution }
  990. {$ifc TARGET_OS_MAC}
  991. const
  992. kCFURLBookmarkResolutionWithSecurityScope = 1 shl 10 ; (* CF_ENUM_AVAILABLE(10_7,NA) *) { Mac OS X 10.7.3 and later, extract the security scope included at creation time to provide the ability to access the resource. }
  993. {$endc}
  994. type
  995. CFURLBookmarkResolutionOptions = CFOptionFlags;
  996. type
  997. CFURLBookmarkFileCreationOptions = CFOptionFlags;
  998. { CF_IMPLICIT_BRIDGING_DISABLED }
  999. { @function CFURLCreateBookmarkData
  1000. @discussion Create a CFDataRef containing an externalizable representation from a CFURLRef, modified with the given options, including ( at the minimum ) any
  1001. properties in the propertiesToInclude array which are retrievable from the given url.
  1002. @param allocator the CFAllocator to use to create this object
  1003. @param url the CFURLRef to create a bookmark data from.
  1004. @param options a set of options which control creation of the bookmark data
  1005. @param resourcePropertiesToInclude If non-NULL, an CFArrayRef of additional properties copied from the url to include in the created bookmark data.
  1006. @param relativeToURL If non-NULL, the created bookmark will be relative to the given url. If kCFURLBookmarkCreationWithSecurityScope is given as
  1007. an option and relativeToURL is non-NULL, then a collection-scoped bookmark is created which enables future access to url provided the caller has
  1008. access to relativeURL.
  1009. @param error If non-NULL, on exit will be filled in with a CFErrorRef representing any error which occurred during creation of the bookmark data
  1010. @result A CFDataRef containing an data, which can be later be passed to CFURLCreateByResolvingBookmarkData() or to CFURLCopyPropertiesForKeysFromBookmarkData() / CFURLCopyPropertyForKeyFromBookmarkData() }
  1011. function CFURLCreateBookmarkData( allocator: CFAllocatorRef; url: CFURLRef; options: CFURLBookmarkCreationOptions; resourcePropertiesToInclude: CFArrayRef; relativeToURL: CFURLRef; error: CFErrorRefPtr ): CFDataRef; external name '_CFURLCreateBookmarkData';
  1012. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  1013. { @function CFURLCreateByResolvingBookmarkData
  1014. @discussion Given a CFDataRef created with CFURLCreateBookmarkRepresentation(), return a CFURLRef of the item it was a bookmark to, and
  1015. attempt to pre-cache those properties in propertiesToInclude in the resulting url. If in the process of resolving the bookmark into the CFURLRef
  1016. it points to this determines that some properties in the bookmark are out of date or not correct for the item it resolves to, set *isStale to YES,
  1017. which the client may want to use to decide to make a new bookmark from the returned item and replace the saved bookmark it has. If the bookmarked
  1018. item cannot be found, return NULL. A bookmark created with security scope may fail to resolve if the caller does not have the same code signing identity
  1019. as the caller which created the bookmark.
  1020. After resolving a security scoped bookmark, the caller must call CFURLStartAccessingSecurityScopedResource() in order to gain access to the resource.
  1021. If an error ( other than "original item can not be found" ) occurs during the process, return NULL and fill in error )
  1022. @param allocator the CFAllocator to use to create this object
  1023. @param bookmark a CFDataRef containing a bookmark data, created with CFURLCreateBookmarkData
  1024. @param options options which affect the resolution
  1025. @param relativeToURL If non-NULL, and if the bookmark was created relative to another url, then resolve it relative to this url. If
  1026. kCFURLBookmarkCreationWithSecurityScope was provided at creation, and kCFURLBookmarkResolutionWithSecurityScope is set, then relativeURL
  1027. should point to the same item which was passed as relavitiveURL at creation time.
  1028. @param resourcePropertiesToInclude If non-NULL, a CFArray containing those properties which the caller would like to already be cached on the given url
  1029. @param isStale If non-NULL, on exit will be set to true if during resolution any of the properties in the bookmark no longer seemed to match the
  1030. corresponding properties on the returned file. Clients, upon seeing a stale representation, may want to replace whatever stored bookmark data they
  1031. have saved and create a new one.
  1032. @param error If non-NULL, on exit will be filled in with a CFErrorRef representing any error which occurred during resolution of the bookmark data
  1033. @result A CFURLRef of a file which is the closest match to the file the bookmark data }
  1034. function CFURLCreateByResolvingBookmarkData( allocator: CFAllocatorRef; bookmark: CFDataRef; options: CFURLBookmarkResolutionOptions; relativeToURL: CFURLRef; resourcePropertiesToInclude: CFArrayRef; isStale: BooleanPtr; error: CFErrorRefPtr ): CFURLRef; external name '_CFURLCreateByResolvingBookmarkData';
  1035. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  1036. { @function CFURLCreatePropertiesForKeysFromBookmarkData
  1037. @discussion Given a bookmark, return a dictionary of properties ( all properties if propertiesToReturn == NULL ).
  1038. This returns only the properties stored within the bookmark and will not attempt to resolve the bookmark or do i/o.
  1039. @param allocator the CFAllocator to use to create this object
  1040. @param bookmark a CFDataRef containing a bookmark data, created with CFURLCreateBookmarkData
  1041. @param propertiesToReturn a CFArrayRef of the properties of the bookmark data which the client would like returned.
  1042. @result a CFDictionaryRef containing the values for the properties passed in obtained from the bookmark data ( not by attempting to resolve it or do i/o in any way ) }
  1043. function CFURLCreateResourcePropertiesForKeysFromBookmarkData( allocator: CFAllocatorRef; resourcePropertiesToReturn: CFArrayRef; bookmark: CFDataRef ): CFDictionaryRef; external name '_CFURLCreateResourcePropertiesForKeysFromBookmarkData';
  1044. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  1045. { @function CFURLCreatePropertyForKeyFromBookmarkData
  1046. @discussion Given a bookmark, return the value for a given property from the bookmark data
  1047. This returns only the properties stored within the bookmark and will not attempt to resolve the bookmark or do i/o.
  1048. @param allocator the CFAllocator to use to create this object
  1049. @param bookmark a CFDataRef containing a bookmark data, created with CFURLCreateBookmarkData
  1050. @param propertyKey the property key to return.
  1051. @result a CFTypeRef value for the property passed in obtained from the bookmark data ( not by attempting to resolve it or do i/o in any way ) }
  1052. function CFURLCreateResourcePropertyForKeyFromBookmarkData( allocator: CFAllocatorRef; resourcePropertyKey: CFStringRef; bookmark: CFDataRef ): CFTypeRef; external name '_CFURLCreateResourcePropertyForKeyFromBookmarkData';
  1053. (* CF_AVAILABLE_STARTING(10_6, 4_0) *)
  1054. {! @function CFURLCreateBookmarkDataFromFile
  1055. @description Given a fileURL of a file which is a Finder "alias" file, return a CFDataRef with the bookmark data from the file. If urlRef points to an alias file
  1056. created before SnowLeopard which contains Alias Manager information and no bookmark data, then a CFDataRef will be synthesized which contains
  1057. a approximation of the alias information in a format which can be used to resolve the bookmark. If an error prevents reading the data or
  1058. if it is corrupt, NULL will be returned and error will be filled in if errorRef is non-NULL.
  1059. @param allocator the CFAllocator to use to create this object
  1060. @param fileURL a CFURLRef to to the alias file to create the bookmark data from
  1061. @param errorRef if non-NULL, on exit will be filled in with a CFErrorRef representing any error which occurred during the creation of the bookmark data from the file
  1062. @result A CFDataRef containing bookmark data, or NULL if there was an error creating bookmark data from the file, such as if the file is not an alias file.
  1063. }
  1064. function CFURLCreateBookmarkDataFromFile( allocator: CFAllocatorRef; fileURL: CFURLRef; var errorRef: CFErrorRef ): CFDataRef; external name '_CFURLCreateBookmarkDataFromFile';
  1065. (* CF_AVAILABLE_STARTING(10_6, 5_0) *)
  1066. {! @function CFURLWriteBookmarkDataToFile
  1067. @description Given a created bookmarkData object, create a new Finder "alias" file at fileURL which contains the bookmark data. If fileURL is a url to a directory, an alias file
  1068. will be created with the same name as the bookmarked item and a ".alias" extension. If fileURL is a url for a file and it exists it will be overwritten. If a
  1069. .alias extension is not present it will be added. In addition to the bookmark data, sufficient pre-SnowLeopard alias data will added to the file to allow
  1070. systems running something before SnowLeopard to resolve this file using Alias Manager routines and get back the same file as the bookmark routines.
  1071. The bookmark data must have been created with the kCFURLBookmarkCreationSuitableForBookmarkFile option and an error will be returned if not.
  1072. @param allocator the CFAllocator to use to create this object
  1073. @param bookmark a CFDataRef containing a bookmark data, created with CFURLCreateBookmarkData
  1074. @param options options flags
  1075. @param errorRef if non-NULL, on exit will be filled in with a CFErrorRef representing any error which occurred during the creation of the alias file
  1076. }
  1077. function CFURLWriteBookmarkDataToFile( bookmarkRef: CFDataRef; fileURL: CFURLRef; options: CFURLBookmarkFileCreationOptions; errorRef: CFErrorRefPtr ): Boolean; external name '_CFURLWriteBookmarkDataToFile';
  1078. (* CF_AVAILABLE_STARTING(10_6, 5_0) *)
  1079. {$ifc TARGET_OS_MAC}
  1080. {! @function CFURLCreateBookmarkDataFromAliasRecord
  1081. @discussion Create a CFDataRef containing bookmarkdata by converting the alias data in aliasRecordDataRef, which should be the contents of an AliasRecord copied into a CFDataRef object.
  1082. The created bookmarkdata can be passed into CFURLCreateByResolvingBookmarkData() to resolve the item into a CFURLRef, or a small set of information can be returned from
  1083. CFURLCreateResourcePropertiesForKeysFromBookmarkData() / CFURLCreateResourcePropertyForKeyFromBookmarkData().
  1084. @param allocator the CFAllocator to use to create this object
  1085. @param aliasRecordDataRef the contents of an AliasRecord to create bookmark data for
  1086. @result A CFDataRef containing an data, which can be later be passed to CFURLCreateByResolvingBookmarkData() or to CFURLCopyPropertiesForKeysFromBookmarkData() / CFURLCopyPropertyForKeyFromBookmarkData()
  1087. }
  1088. function CFURLCreateBookmarkDataFromAliasRecord ( allocatorRef: CFAllocatorRef; aliasRecordDataRef: CFDataRef ): CFDataRef; external name '_CFURLCreateBookmarkDataFromAliasRecord';
  1089. (* CF_AVAILABLE_STARTING(10_6, NA) *)
  1090. {$endc}
  1091. { CF_IMPLICIT_BRIDGING_ENABLED }
  1092. {$ifc TARGET_OS_MAC}
  1093. {! @function CFURLStartAccessingSecurityScopedResource
  1094. @discussion Given a CFURLRef created by resolving a bookmark data created with security scope, make the resource referenced by the
  1095. url accessible to the process. When access to this resource is no longer needed the client should call
  1096. CFURLStopAccessingSecurityScopedResource(). Each call to CFURLStartAccessingSecurityScopedResource() must be balanced
  1097. with a call to CFURLStopAccessingSecurityScopedResource().
  1098. @param url the CFURLRef for the resource returned by CFURLCreateByResolvingBookmarkData() using kCFURLBookmarkResolutionWithSecurityScope.
  1099. @result returns TRUE if access was granted and FALSE if the url does not reference a security scoped resource, or if some error occurred
  1100. which didn't allow access to be granted
  1101. }
  1102. function CFURLStartAccessingSecurityScopedResource( url: CFURLRef ): Boolean; external name '_CFURLStartAccessingSecurityScopedResource';
  1103. (* CF_AVAILABLE_STARTING(10_7, NA) *) // Available in MacOS X 10.7.3 and later
  1104. {! @function CFURLStopAccessingSecurityScopedResource
  1105. @discussion Revokes the access granted to the url by a prior successful call to CFURLStartAccessingSecurityScopedResource().
  1106. @param url the CFURLRef for the resource to stop accessing.
  1107. }
  1108. procedure CFURLStopAccessingSecurityScopedResource( url: CFURLRef ); external name '_CFURLStopAccessingSecurityScopedResource';
  1109. (* CF_AVAILABLE_STARTING(10_7, NA) *)
  1110. {$endc}
  1111. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  1112. end.
  1113. {$endc} {not MACOSALLINCLUDE}