Aliases.pas 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178
  1. {
  2. File: CarbonCore/Aliases.h
  3. Contains: Alias Manager Interfaces.
  4. The contents of this header file are deprecated.
  5. Use Foundation or CoreFoundation URL Bookmarks instead.
  6. Copyright: © 1989-2011 by Apple Inc. All rights reserved.
  7. }
  8. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, October 2009 }
  9. { Pascal Translation Updated: Jonas Maebe, <[email protected]>, September 2012 }
  10. {
  11. Modified for use with Free Pascal
  12. Version 308
  13. Please report any bugs to <[email protected]>
  14. }
  15. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$calling mwpascal}
  21. unit Aliases;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0400}
  24. {$setc GAP_INTERFACES_VERSION := $0308}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC32}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __ppc64__ and defined CPUPOWERPC64}
  40. {$setc __ppc64__ := 1}
  41. {$elsec}
  42. {$setc __ppc64__ := 0}
  43. {$endc}
  44. {$ifc not defined __i386__ and defined CPUI386}
  45. {$setc __i386__ := 1}
  46. {$elsec}
  47. {$setc __i386__ := 0}
  48. {$endc}
  49. {$ifc not defined __x86_64__ and defined CPUX86_64}
  50. {$setc __x86_64__ := 1}
  51. {$elsec}
  52. {$setc __x86_64__ := 0}
  53. {$endc}
  54. {$ifc not defined __arm__ and defined CPUARM}
  55. {$setc __arm__ := 1}
  56. {$elsec}
  57. {$setc __arm__ := 0}
  58. {$endc}
  59. {$ifc defined cpu64}
  60. {$setc __LP64__ := 1}
  61. {$elsec}
  62. {$setc __LP64__ := 0}
  63. {$endc}
  64. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  65. {$error Conflicting definitions for __ppc__ and __i386__}
  66. {$endc}
  67. {$ifc defined __ppc__ and __ppc__}
  68. {$setc TARGET_CPU_PPC := TRUE}
  69. {$setc TARGET_CPU_PPC64 := FALSE}
  70. {$setc TARGET_CPU_X86 := FALSE}
  71. {$setc TARGET_CPU_X86_64 := FALSE}
  72. {$setc TARGET_CPU_ARM := FALSE}
  73. {$setc TARGET_OS_MAC := TRUE}
  74. {$setc TARGET_OS_IPHONE := FALSE}
  75. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  76. {$setc TARGET_OS_EMBEDDED := FALSE}
  77. {$elifc defined __ppc64__ and __ppc64__}
  78. {$setc TARGET_CPU_PPC := FALSE}
  79. {$setc TARGET_CPU_PPC64 := TRUE}
  80. {$setc TARGET_CPU_X86 := FALSE}
  81. {$setc TARGET_CPU_X86_64 := FALSE}
  82. {$setc TARGET_CPU_ARM := FALSE}
  83. {$setc TARGET_OS_MAC := TRUE}
  84. {$setc TARGET_OS_IPHONE := FALSE}
  85. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  86. {$setc TARGET_OS_EMBEDDED := FALSE}
  87. {$elifc defined __i386__ and __i386__}
  88. {$setc TARGET_CPU_PPC := FALSE}
  89. {$setc TARGET_CPU_PPC64 := FALSE}
  90. {$setc TARGET_CPU_X86 := TRUE}
  91. {$setc TARGET_CPU_X86_64 := FALSE}
  92. {$setc TARGET_CPU_ARM := FALSE}
  93. {$ifc defined(iphonesim)}
  94. {$setc TARGET_OS_MAC := FALSE}
  95. {$setc TARGET_OS_IPHONE := TRUE}
  96. {$setc TARGET_IPHONE_SIMULATOR := TRUE}
  97. {$elsec}
  98. {$setc TARGET_OS_MAC := TRUE}
  99. {$setc TARGET_OS_IPHONE := FALSE}
  100. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  101. {$endc}
  102. {$setc TARGET_OS_EMBEDDED := FALSE}
  103. {$elifc defined __x86_64__ and __x86_64__}
  104. {$setc TARGET_CPU_PPC := FALSE}
  105. {$setc TARGET_CPU_PPC64 := FALSE}
  106. {$setc TARGET_CPU_X86 := FALSE}
  107. {$setc TARGET_CPU_X86_64 := TRUE}
  108. {$setc TARGET_CPU_ARM := FALSE}
  109. {$setc TARGET_OS_MAC := TRUE}
  110. {$setc TARGET_OS_IPHONE := FALSE}
  111. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  112. {$setc TARGET_OS_EMBEDDED := FALSE}
  113. {$elifc defined __arm__ and __arm__}
  114. {$setc TARGET_CPU_PPC := FALSE}
  115. {$setc TARGET_CPU_PPC64 := FALSE}
  116. {$setc TARGET_CPU_X86 := FALSE}
  117. {$setc TARGET_CPU_X86_64 := FALSE}
  118. {$setc TARGET_CPU_ARM := TRUE}
  119. { will require compiler define when/if other Apple devices with ARM cpus ship }
  120. {$setc TARGET_OS_MAC := FALSE}
  121. {$setc TARGET_OS_IPHONE := TRUE}
  122. {$setc TARGET_IPHONE_SIMULATOR := FALSE}
  123. {$setc TARGET_OS_EMBEDDED := TRUE}
  124. {$elsec}
  125. {$error __ppc__ nor __ppc64__ nor __i386__ nor __x86_64__ nor __arm__ is defined.}
  126. {$endc}
  127. {$ifc defined __LP64__ and __LP64__ }
  128. {$setc TARGET_CPU_64 := TRUE}
  129. {$elsec}
  130. {$setc TARGET_CPU_64 := FALSE}
  131. {$endc}
  132. {$ifc defined FPC_BIG_ENDIAN}
  133. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  134. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  135. {$elifc defined FPC_LITTLE_ENDIAN}
  136. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  137. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  138. {$elsec}
  139. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  140. {$endc}
  141. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  142. {$setc CALL_NOT_IN_CARBON := FALSE}
  143. {$setc OLDROUTINENAMES := FALSE}
  144. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  145. {$setc OPAQUE_UPP_TYPES := TRUE}
  146. {$setc OTCARBONAPPLICATION := TRUE}
  147. {$setc OTKERNEL := FALSE}
  148. {$setc PM_USE_SESSION_APIS := TRUE}
  149. {$setc TARGET_API_MAC_CARBON := TRUE}
  150. {$setc TARGET_API_MAC_OS8 := FALSE}
  151. {$setc TARGET_API_MAC_OSX := TRUE}
  152. {$setc TARGET_CARBON := TRUE}
  153. {$setc TARGET_CPU_68K := FALSE}
  154. {$setc TARGET_CPU_MIPS := FALSE}
  155. {$setc TARGET_CPU_SPARC := FALSE}
  156. {$setc TARGET_OS_UNIX := FALSE}
  157. {$setc TARGET_OS_WIN32 := FALSE}
  158. {$setc TARGET_RT_MAC_68881 := FALSE}
  159. {$setc TARGET_RT_MAC_CFM := FALSE}
  160. {$setc TARGET_RT_MAC_MACHO := TRUE}
  161. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  162. {$setc TYPE_BOOL := FALSE}
  163. {$setc TYPE_EXTENDED := FALSE}
  164. {$setc TYPE_LONGLONG := TRUE}
  165. uses MacTypes,Files,UTCUtils,CFBase;
  166. {$endc} {not MACOSALLINCLUDE}
  167. {$ifc TARGET_OS_MAC}
  168. {$ALIGN MAC68K}
  169. type
  170. FSAliasInfoBitmap = UInt32;
  171. FSAliasInfoBitmapPtr = ^FSAliasInfoBitmap;
  172. const
  173. kFSAliasInfoNone = $00000000; { no valid info}
  174. kFSAliasInfoVolumeCreateDate = $00000001; { volume creation date is valid}
  175. kFSAliasInfoTargetCreateDate = $00000002; { target creation date is valid}
  176. kFSAliasInfoFinderInfo = $00000004; { file type and creator are valid}
  177. kFSAliasInfoIsDirectory = $00000008; { isDirectory boolean is valid}
  178. kFSAliasInfoIDs = $00000010; { parentDirID and nodeID are valid}
  179. kFSAliasInfoFSInfo = $00000020; { filesystemID and signature are valid}
  180. kFSAliasInfoVolumeFlags = $00000040; { volumeIsBootVolume, volumeIsAutomounted, volumeIsEjectable and volumeHasPersistentFileIDs are valid}
  181. const
  182. rAliasType = FourCharCode('alis'); { Aliases are stored as resources of this type }
  183. const
  184. { define alias resolution action rules mask }
  185. kARMMountVol = $00000001; { mount the volume automatically }
  186. kARMNoUI = $00000002; { no user interface allowed during resolution }
  187. kARMMultVols = $00000008; { search on multiple volumes }
  188. kARMSearch = $00000100; { search quickly }
  189. kARMSearchMore = $00000200; { search further }
  190. kARMSearchRelFirst = $00000400; { search target on a relative path first }
  191. kARMTryFileIDFirst = $00000800; { search by file id before path }
  192. const
  193. { define alias record information types }
  194. asiZoneName = -3; { get zone name }
  195. asiServerName = -2; { get server name }
  196. asiVolumeName = -1; { get volume name }
  197. asiAliasName = 0; { get aliased file/folder/volume name }
  198. asiParentName = 1; { get parent folder name }
  199. { ResolveAliasFileWithMountFlags options }
  200. const
  201. kResolveAliasFileNoUI = $00000001; { no user interaction during resolution }
  202. kResolveAliasTryFileIDFirst = $00000002; { search by file id before path }
  203. { define the alias record that will be the blackbox for the caller }
  204. type
  205. AliasRecordPtr = ^AliasRecord;
  206. { Opaque as of Mac OS X 10.4 ... }
  207. AliasRecord = record
  208. userType: OSType; { appl stored type like creator type }
  209. aliasSize: UInt16; { alias record size in bytes, for appl usage }
  210. end;
  211. type
  212. AliasPtr = AliasRecordPtr;
  213. AliasHandle = ^AliasPtr;
  214. { info block to pass to FSCopyAliasInfo }
  215. type
  216. FSAliasInfo = record
  217. volumeCreateDate: UTCDateTime;
  218. targetCreateDate: UTCDateTime;
  219. fileType: OSType;
  220. fileCreator: OSType;
  221. parentDirID: UInt32;
  222. nodeID: UInt32;
  223. filesystemID: UInt16;
  224. signature: UInt16;
  225. volumeIsBootVolume: Boolean;
  226. volumeIsAutomounted: Boolean;
  227. volumeIsEjectable: Boolean;
  228. volumeHasPersistentFileIDs: Boolean;
  229. isDirectory: Boolean;
  230. end;
  231. FSAliasInfoPtr = ^FSAliasInfo;
  232. { alias record information type }
  233. type
  234. AliasInfoType = SInt16;
  235. {$ifc not TARGET_CPU_64}
  236. type
  237. AliasFilterProcPtr = function( cpbPtr: CInfoPBPtr; var quitFlag: Boolean; myDataPtr: Ptr ): Boolean;
  238. AliasFilterUPP = AliasFilterProcPtr;
  239. {
  240. * NewAliasFilterUPP()
  241. *
  242. * Availability:
  243. * Mac OS X: in version 10.0 and later in CoreServices.framework
  244. * CarbonLib: in CarbonLib 1.0 and later
  245. * Non-Carbon CFM: available as macro/inline
  246. }
  247. { old name was NewAliasFilterProc }
  248. function NewAliasFilterUPP( userRoutine: AliasFilterProcPtr ): AliasFilterUPP; external name '_NewAliasFilterUPP';
  249. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  250. {
  251. * DisposeAliasFilterUPP()
  252. *
  253. * Availability:
  254. * Mac OS X: in version 10.0 and later in CoreServices.framework
  255. * CarbonLib: in CarbonLib 1.0 and later
  256. * Non-Carbon CFM: available as macro/inline
  257. }
  258. procedure DisposeAliasFilterUPP( userUPP: AliasFilterUPP ); external name '_DisposeAliasFilterUPP';
  259. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  260. {
  261. * InvokeAliasFilterUPP()
  262. *
  263. * Availability:
  264. * Mac OS X: in version 10.0 and later in CoreServices.framework
  265. * CarbonLib: in CarbonLib 1.0 and later
  266. * Non-Carbon CFM: available as macro/inline
  267. }
  268. function InvokeAliasFilterUPP( cpbPtr: CInfoPBPtr; var quitFlag: Boolean; myDataPtr: Ptr; userUPP: AliasFilterUPP ): Boolean; external name '_InvokeAliasFilterUPP';
  269. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  270. {#if __MACH__
  271. #define NewAliasFilterUPP(userRoutine) ((AliasFilterUPP)userRoutine)
  272. #define DisposeAliasFilterUPP(userUPP)
  273. #define InvokeAliasFilterUPP(cpbPtr, quitFlag, myDataPtr, userUPP) (*userUPP)(cpbPtr, quitFlag, myDataPtr)
  274. #endif}
  275. {$endc} {not TARGET_CPU_64}
  276. type
  277. FSAliasFilterProcPtr = function( const (*var*) ref: FSRef; var quitFlag: Boolean; myDataPtr: Ptr ): Boolean;
  278. FSAliasFilterUPP = FSAliasFilterProcPtr;
  279. {
  280. * FSNewAlias()
  281. *
  282. * Mac OS X threading:
  283. * Thread safe since version 10.3
  284. *
  285. * Availability:
  286. * Mac OS X: in version 10.0 and later in CoreServices.framework
  287. * CarbonLib: in CarbonLib 1.1 and later
  288. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  289. }
  290. function FSNewAlias( {const} fromFile: FSRefPtr { can be NULL }; const (*var*) target: FSRef; var inAlias: AliasHandle ): OSErr; external name '_FSNewAlias';
  291. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  292. {
  293. * FSNewAliasMinimal()
  294. *
  295. * Mac OS X threading:
  296. * Thread safe since version 10.3
  297. *
  298. * Availability:
  299. * Mac OS X: in version 10.0 and later in CoreServices.framework
  300. * CarbonLib: in CarbonLib 1.1 and later
  301. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  302. }
  303. function FSNewAliasMinimal( const (*var*) target: FSRef; var inAlias: AliasHandle ): OSErr; external name '_FSNewAliasMinimal';
  304. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  305. {
  306. * FSIsAliasFile()
  307. *
  308. * Mac OS X threading:
  309. * Thread safe since version 10.3
  310. *
  311. * Availability:
  312. * Mac OS X: in version 10.0 and later in CoreServices.framework
  313. * CarbonLib: in CarbonLib 1.1 and later
  314. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  315. }
  316. function FSIsAliasFile( const (*var*) fileRef: FSRef; var aliasFileFlag: Boolean; var folderFlag: Boolean ): OSErr; external name '_FSIsAliasFile';
  317. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  318. {
  319. * FSResolveAliasWithMountFlags()
  320. *
  321. * Mac OS X threading:
  322. * Thread safe since version 10.3
  323. *
  324. * Availability:
  325. * Mac OS X: in version 10.0 and later in CoreServices.framework
  326. * CarbonLib: in CarbonLib 1.1 and later
  327. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  328. }
  329. function FSResolveAliasWithMountFlags( {const} fromFile: FSRefPtr { can be NULL }; inAlias: AliasHandle; var target: FSRef; var wasChanged: Boolean; mountFlags: UNSIGNEDLONG ): OSErr; external name '_FSResolveAliasWithMountFlags';
  330. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  331. {
  332. * FSResolveAlias()
  333. *
  334. * Mac OS X threading:
  335. * Thread safe since version 10.3
  336. *
  337. * Availability:
  338. * Mac OS X: in version 10.0 and later in CoreServices.framework
  339. * CarbonLib: in CarbonLib 1.1 and later
  340. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  341. }
  342. function FSResolveAlias( {const} fromFile: FSRefPtr { can be NULL }; alias: AliasHandle; var target: FSRef; var wasChanged: Boolean ): OSErr; external name '_FSResolveAlias';
  343. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  344. {
  345. * FSResolveAliasFileWithMountFlags()
  346. *
  347. * Mac OS X threading:
  348. * Thread safe since version 10.3
  349. *
  350. * Availability:
  351. * Mac OS X: in version 10.0 and later in CoreServices.framework
  352. * CarbonLib: in CarbonLib 1.1 and later
  353. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  354. }
  355. function FSResolveAliasFileWithMountFlags( var theRef: FSRef; resolveAliasChains: Boolean; var targetIsFolder: Boolean; var wasAliased: Boolean; mountFlags: UNSIGNEDLONG ): OSErr; external name '_FSResolveAliasFileWithMountFlags';
  356. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  357. {
  358. * FSResolveAliasFile()
  359. *
  360. * Mac OS X threading:
  361. * Thread safe since version 10.3
  362. *
  363. * Availability:
  364. * Mac OS X: in version 10.0 and later in CoreServices.framework
  365. * CarbonLib: in CarbonLib 1.1 and later
  366. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  367. }
  368. function FSResolveAliasFile( var theRef: FSRef; resolveAliasChains: Boolean; var targetIsFolder: Boolean; var wasAliased: Boolean ): OSErr; external name '_FSResolveAliasFile';
  369. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  370. {
  371. * FSFollowFinderAlias()
  372. *
  373. * Mac OS X threading:
  374. * Thread safe since version 10.3
  375. *
  376. * Availability:
  377. * Mac OS X: in version 10.0 and later in CoreServices.framework
  378. * CarbonLib: in CarbonLib 1.1 and later
  379. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  380. }
  381. function FSFollowFinderAlias( fromFile: FSRefPtr { can be NULL }; alias: AliasHandle; logon: Boolean; var target: FSRef; var wasChanged: Boolean ): OSErr; external name '_FSFollowFinderAlias';
  382. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  383. {
  384. * FSUpdateAlias()
  385. *
  386. * Mac OS X threading:
  387. * Thread safe since version 10.3
  388. *
  389. * Availability:
  390. * Mac OS X: in version 10.0 and later in CoreServices.framework
  391. * CarbonLib: in CarbonLib 1.1 and later
  392. * Non-Carbon CFM: in InterfaceLib 9.1 and later
  393. }
  394. function FSUpdateAlias( {const} fromFile: FSRefPtr { can be NULL }; const (*var*) target: FSRef; alias: AliasHandle; var wasChanged: Boolean ): OSErr; external name '_FSUpdateAlias';
  395. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  396. {
  397. * FSNewAliasUnicode()
  398. *
  399. * Summary:
  400. * Creates an alias given a ref to the target's parent directory and
  401. * the target's unicode name. If the target does not exist fnfErr
  402. * will be returned but the alias will still be created. This
  403. * allows the creation of aliases to targets that do not exist.
  404. *
  405. * Mac OS X threading:
  406. * Thread safe since version 10.3
  407. *
  408. * Parameters:
  409. *
  410. * fromFile:
  411. * The starting point for a relative search.
  412. *
  413. * targetParentRef:
  414. * An FSRef to the parent directory of the target.
  415. *
  416. * targetNameLength:
  417. * Number of Unicode characters in the target's name.
  418. *
  419. * targetName:
  420. * A pointer to the Unicode name.
  421. *
  422. * inAlias:
  423. * A Handle to the newly created alias record.
  424. *
  425. * isDirectory:
  426. * On input, if target does not exist, a flag to indicate whether
  427. * or not the target is a directory. On output, if the target did
  428. * exist, a flag indicating if the target is a directory. Pass
  429. * NULL in the non-existant case if unsure.
  430. *
  431. * Availability:
  432. * Mac OS X: in version 10.2 and later in CoreServices.framework
  433. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  434. * Non-Carbon CFM: not available
  435. }
  436. function FSNewAliasUnicode( {const} fromFile: FSRefPtr { can be NULL }; const (*var*) targetParentRef: FSRef; targetNameLength: UniCharCount; targetName: ConstUniCharPtr; var inAlias: AliasHandle; isDirectory: BooleanPtr { can be NULL } ): OSErr; external name '_FSNewAliasUnicode';
  437. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  438. {
  439. * FSNewAliasMinimalUnicode()
  440. *
  441. * Summary:
  442. * Creates a minimal alias given a ref to the target's parent
  443. * directory and the target's unicode name. If the target does not
  444. * exist fnfErr will be returned but the alias will still be created.
  445. *
  446. * Mac OS X threading:
  447. * Thread safe since version 10.3
  448. *
  449. * Parameters:
  450. *
  451. * targetParentRef:
  452. * An FSRef to the parent directory of the target.
  453. *
  454. * targetNameLength:
  455. * Number of Unicode characters in the target's name.
  456. *
  457. * targetName:
  458. * A pointer to the Unicode name.
  459. *
  460. * inAlias:
  461. * A Handle to the newly created alias record.
  462. *
  463. * isDirectory:
  464. * On input, if target does not exist, a flag to indicate whether
  465. * or not the target is a directory. On output, if the target did
  466. * exist, a flag indicating if the target is a directory. Pass
  467. * NULL in the non-existant case if unsure.
  468. *
  469. * Availability:
  470. * Mac OS X: in version 10.2 and later in CoreServices.framework
  471. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  472. * Non-Carbon CFM: not available
  473. }
  474. function FSNewAliasMinimalUnicode( const (*var*) targetParentRef: FSRef; targetNameLength: UniCharCount; targetName: ConstUniCharPtr; var inAlias: AliasHandle; isDirectory: BooleanPtr { can be NULL } ): OSErr; external name '_FSNewAliasMinimalUnicode';
  475. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  476. {
  477. * FSNewAliasFromPath()
  478. *
  479. * Summary:
  480. * Creates an alias given a POSIX style utf-8 path to the target.
  481. * If the target file does not exist but the path up to the leaf
  482. * does then fnfErr will be returned but the alias will still be
  483. * created.
  484. *
  485. * Mac OS X threading:
  486. * Thread safe since version 10.5
  487. *
  488. * Parameters:
  489. *
  490. * fromFilePath:
  491. * The starting point for a relative search.
  492. *
  493. * targetPath:
  494. * POSIX style UTF-8 path to target.
  495. *
  496. * flags:
  497. * Options for future use. Pass in 0.
  498. *
  499. * inAlias:
  500. * A Handle to the newly created alias record.
  501. *
  502. * isDirectory:
  503. * On input, if target does not exist, a flag to indicate whether
  504. * or not the target is a directory. On output, if the target did
  505. * exist, a flag indicating if the target is a directory. Pass
  506. * NULL in the non-existant case if unsure.
  507. *
  508. * Availability:
  509. * Mac OS X: in version 10.5 and later in CoreServices.framework
  510. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.5 and later
  511. * Non-Carbon CFM: not available
  512. }
  513. function FSNewAliasFromPath( fromFilePath: ConstCStringPtr { can be NULL }; targetPath: ConstCStringPtr; flags: OptionBits; var inAlias: AliasHandle; isDirectory: BooleanPtr { can be NULL } ): OSStatus; external name '_FSNewAliasFromPath';
  514. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  515. {
  516. * FSMatchAliasBulk()
  517. *
  518. * Summary:
  519. * Given an alias handle and fromFile, match the alias and return
  520. * FSRefs to the aliased file(s) and needsUpdate flag
  521. *
  522. * Mac OS X threading:
  523. * Thread safe since version 10.5
  524. *
  525. * Availability:
  526. * Mac OS X: in version 10.5 and later in CoreServices.framework
  527. * CarbonLib: not available
  528. * Non-Carbon CFM: not available
  529. }
  530. function FSMatchAliasBulk( {const} fromFile: FSRefPtr { can be NULL }; rulesMask: UNSIGNEDLONG; inAlias: AliasHandle; var aliasCount: SInt16; var aliasList: FSRef; var needsUpdate: Boolean; aliasFilter: FSAliasFilterProcPtr { can be NULL }; yourDataPtr: UnivPtr { can be NULL } ): OSStatus; external name '_FSMatchAliasBulk';
  531. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  532. {
  533. * FSCopyAliasInfo()
  534. *
  535. * Discussion:
  536. * This routine will return the requested information from the
  537. * passed in aliasHandle. The information is gathered only from the
  538. * alias record so it may not match what is on disk (no disk i/o is
  539. * performed). The whichInfo paramter is an output parameter that
  540. * signifies which fields in the info record contain valid data.
  541. *
  542. * Mac OS X threading:
  543. * Thread safe since version 10.2
  544. *
  545. * Parameters:
  546. *
  547. * inAlias:
  548. * A handle to the alias record to get the information from.
  549. *
  550. * targetName:
  551. * The name of the target item.
  552. *
  553. * volumeName:
  554. * The name of the volume the target resides on.
  555. *
  556. * pathString:
  557. * POSIX path to target.
  558. *
  559. * whichInfo:
  560. * An indication of which fields in the info block contain valid
  561. * data.
  562. *
  563. * info:
  564. * Returned information about the alias.
  565. *
  566. * Availability:
  567. * Mac OS X: in version 10.2 and later in CoreServices.framework
  568. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  569. * Non-Carbon CFM: not available
  570. }
  571. function FSCopyAliasInfo( inAlias: AliasHandle; targetName: HFSUniStr255Ptr { can be NULL }; volumeName: HFSUniStr255Ptr { can be NULL }; pathString: CFStringRefPtr { can be NULL }; whichInfo: FSAliasInfoBitmapPtr { can be NULL }; info: FSAliasInfoPtr { can be NULL } ): OSStatus; external name '_FSCopyAliasInfo';
  572. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  573. {
  574. * GetAliasSize()
  575. *
  576. * Discussion:
  577. * This routine will return the size of the alias record referenced
  578. * by the AliasHandle alias. This will be smaller than the size
  579. * returned by GetHandleSize if any custom data has been added (IM
  580. * Files 4-13).
  581. *
  582. * Mac OS X threading:
  583. * Thread safe since version 10.4
  584. *
  585. * Parameters:
  586. *
  587. * alias:
  588. * A handle to the alias record to get the information from.
  589. *
  590. * Result:
  591. * The size of the private section of the alias record.
  592. *
  593. * Availability:
  594. * Mac OS X: in version 10.4 and later in CoreServices.framework
  595. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  596. * Non-Carbon CFM: not available
  597. }
  598. function GetAliasSize( alias: AliasHandle ): Size; external name '_GetAliasSize';
  599. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  600. {
  601. * GetAliasUserType()
  602. *
  603. * Discussion:
  604. * This routine will return the usertype associated with the alias
  605. * record referenced by the AliasHandle alias.
  606. *
  607. * Mac OS X threading:
  608. * Thread safe since version 10.4
  609. *
  610. * Parameters:
  611. *
  612. * alias:
  613. * A handle to the alias record to get the userType from.
  614. *
  615. * Result:
  616. * The userType associated with the alias as an OSType
  617. *
  618. * Availability:
  619. * Mac OS X: in version 10.4 and later in CoreServices.framework
  620. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  621. * Non-Carbon CFM: not available
  622. }
  623. function GetAliasUserType( alias: AliasHandle ): OSType; external name '_GetAliasUserType';
  624. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  625. {
  626. * SetAliasUserType()
  627. *
  628. * Discussion:
  629. * This routine will set the userType associated with an alias
  630. * record.
  631. *
  632. * Mac OS X threading:
  633. * Thread safe since version 10.4
  634. *
  635. * Parameters:
  636. *
  637. * alias:
  638. * A handle to the alias record to set the userType for.
  639. *
  640. * userType:
  641. * The OSType to set the userType to.
  642. *
  643. * Availability:
  644. * Mac OS X: in version 10.4 and later in CoreServices.framework
  645. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.4 and later
  646. * Non-Carbon CFM: not available
  647. }
  648. procedure SetAliasUserType( alias: AliasHandle; userType: OSType ); external name '_SetAliasUserType';
  649. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  650. {
  651. * GetAliasSizeFromPtr()
  652. *
  653. * Discussion:
  654. * This routine will return the size of the alias record referenced
  655. * by a pointer to the AliasRecord.
  656. *
  657. * Mac OS X threading:
  658. * Thread safe since version 10.4
  659. *
  660. * Parameters:
  661. *
  662. * alias:
  663. * A pointer to the alias record to get the information from.
  664. *
  665. * Result:
  666. * The size of the private section of the alias record.
  667. *
  668. * Availability:
  669. * Mac OS X: in version 10.4 and later in CoreServices.framework
  670. * CarbonLib: not available
  671. * Non-Carbon CFM: not available
  672. }
  673. function GetAliasSizeFromPtr( const (*var*) alias: AliasRecord ): Size; external name '_GetAliasSizeFromPtr';
  674. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  675. {
  676. * GetAliasUserTypeFromPtr()
  677. *
  678. * Discussion:
  679. * This routine will return the usertype associated withthe alias
  680. * record pointed to by alias.
  681. *
  682. * Mac OS X threading:
  683. * Thread safe since version 10.4
  684. *
  685. * Parameters:
  686. *
  687. * alias:
  688. * A pointer to the alias record to get the userType from.
  689. *
  690. * Result:
  691. * The userType associated with the alias as an OSType
  692. *
  693. * Availability:
  694. * Mac OS X: in version 10.4 and later in CoreServices.framework
  695. * CarbonLib: not available
  696. * Non-Carbon CFM: not available
  697. }
  698. function GetAliasUserTypeFromPtr( const (*var*) alias: AliasRecord ): OSType; external name '_GetAliasUserTypeFromPtr';
  699. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  700. {
  701. * SetAliasUserTypeWithPtr()
  702. *
  703. * Discussion:
  704. * This routine will set the userType associated with an alias
  705. * record.
  706. *
  707. * Mac OS X threading:
  708. * Thread safe since version 10.4
  709. *
  710. * Parameters:
  711. *
  712. * alias:
  713. * A pointer to the alias record to set the userType for.
  714. *
  715. * userType:
  716. * The OSType to set the userType to.
  717. *
  718. * Availability:
  719. * Mac OS X: in version 10.4 and later in CoreServices.framework
  720. * CarbonLib: not available
  721. * Non-Carbon CFM: not available
  722. }
  723. procedure SetAliasUserTypeWithPtr( alias: AliasPtr; userType: OSType ); external name '_SetAliasUserTypeWithPtr';
  724. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_4, __MAC_10_8, __IPHONE_NA, __IPHONE_NA) *)
  725. { Functions beyond this point are deprecated}
  726. {$ifc not TARGET_CPU_64}
  727. {
  728. * FSMatchAlias() *** DEPRECATED ***
  729. *
  730. * Deprecated:
  731. * Use FSMatchAliasBulk instead
  732. *
  733. * Summary:
  734. * Given an alias handle and fromFile, match the alias and return
  735. * FSRefs to the aliased file(s) and needsUpdate flag
  736. *
  737. * Mac OS X threading:
  738. * Thread safe since version 10.3
  739. *
  740. * Availability:
  741. * Mac OS X: in version 10.2 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  742. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  743. * Non-Carbon CFM: not available
  744. }
  745. function FSMatchAlias( {const} fromFile: FSRefPtr { can be NULL }; rulesMask: UNSIGNEDLONG; inAlias: AliasHandle; var aliasCount: SInt16; var aliasList: FSRef; var needsUpdate: Boolean; aliasFilter: AliasFilterUPP; yourDataPtr: UnivPtr ): OSErr; external name '_FSMatchAlias';
  746. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  747. {
  748. * FSMatchAliasNoUI() *** DEPRECATED ***
  749. *
  750. * Deprecated:
  751. * Use FSMatchAliasBulk with the kARMNoUI flag instead
  752. *
  753. * Summary:
  754. * variation on FSMatchAlias that does not prompt user with a dialog
  755. *
  756. * Mac OS X threading:
  757. * Thread safe since version 10.3
  758. *
  759. * Availability:
  760. * Mac OS X: in version 10.2 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  761. * CarbonLib: not available in CarbonLib 1.x, is available on Mac OS X version 10.2 and later
  762. * Non-Carbon CFM: not available
  763. }
  764. function FSMatchAliasNoUI( {const} fromFile: FSRefPtr { can be NULL }; rulesMask: UNSIGNEDLONG; inAlias: AliasHandle; var aliasCount: SInt16; var aliasList: FSRef; var needsUpdate: Boolean; aliasFilter: AliasFilterUPP; yourDataPtr: UnivPtr ): OSErr; external name '_FSMatchAliasNoUI';
  765. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_2, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  766. {
  767. * NewAlias() *** DEPRECATED ***
  768. *
  769. * Deprecated:
  770. * Use FSNewAlias
  771. *
  772. * Summary:
  773. * create a new alias between fromFile and target, returns alias
  774. * record handle
  775. *
  776. * Discussion:
  777. * Create an alias betwen fromFile and target, and return it in an
  778. * AliasHandle. This function is deprecated in Mac OS X 10.4;
  779. * instead, you should use FSNewAliasUnicode() because NewAlias()
  780. * has problems creating aliases to certain files, including those
  781. * which are impossible to represent in an FSSpec.
  782. *
  783. * Mac OS X threading:
  784. * Thread safe since version 10.3
  785. *
  786. * Availability:
  787. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  788. * CarbonLib: in CarbonLib 1.0 and later
  789. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  790. }
  791. function NewAlias( {const} fromFile: FSSpecPtr { can be NULL }; const (*var*) target: FSSpec; var alias: AliasHandle ): OSErr; external name '_NewAlias';
  792. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  793. {
  794. * NewAliasMinimal() *** DEPRECATED ***
  795. *
  796. * Deprecated:
  797. * Use FSNewAliasMinimalUnicode
  798. *
  799. * Summary:
  800. * create a minimal new alias for a target and return alias record
  801. * handle
  802. *
  803. * Discussion:
  804. * Create a minimal alias for a target, and return it in an
  805. * AliasHandle. This function is deprecated in Mac OS X 10.4;
  806. * instead, you should use FSNewAliasMinimalUnicode() because
  807. * NewAliasMinimalAlias() has problems creating aliases to certain
  808. * files, including those which are impossible to represent in an
  809. * FSSpec.
  810. *
  811. * Mac OS X threading:
  812. * Thread safe since version 10.3
  813. *
  814. * Availability:
  815. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  816. * CarbonLib: in CarbonLib 1.0 and later
  817. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  818. }
  819. function NewAliasMinimal( const (*var*) target: FSSpec; var alias: AliasHandle ): OSErr; external name '_NewAliasMinimal';
  820. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  821. {
  822. * NewAliasMinimalFromFullPath() *** DEPRECATED ***
  823. *
  824. * Deprecated:
  825. * Use FSNewAliasMinimalUnicode
  826. *
  827. * Summary:
  828. * create a minimal new alias from a target fullpath (optional zone
  829. * and server name) and return alias record handle
  830. *
  831. * Discussion:
  832. * Create a minimal alias for a target fullpath, and return it in an
  833. * AliasHandle. This function is deprecated in Mac OS X 10.4;
  834. * instead, you should use FSNewAliasMinimalUnicode() because
  835. * NewAliasMinimalFromFullPath() has problems creating aliases to
  836. * certain files, including those which are impossible to represent
  837. * in an FSSpec.
  838. *
  839. * Mac OS X threading:
  840. * Thread safe since version 10.3
  841. *
  842. * Availability:
  843. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  844. * CarbonLib: in CarbonLib 1.0 and later
  845. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  846. }
  847. function NewAliasMinimalFromFullPath( fullPathLength: SInt16; fullPath: {const} UnivPtr; const (*var*) zoneName: Str32; const (*var*) serverName: Str31; var alias: AliasHandle ): OSErr; external name '_NewAliasMinimalFromFullPath';
  848. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  849. {
  850. * ResolveAlias() *** DEPRECATED ***
  851. *
  852. * Deprecated:
  853. * Use FSResolveAlias() or FSResolveAliasWithMountFlags() instead.
  854. *
  855. * Summary:
  856. * given an alias handle and fromFile, resolve the alias, update the
  857. * alias record and return aliased filename and wasChanged flag.
  858. *
  859. * Mac OS X threading:
  860. * Thread safe since version 10.3
  861. *
  862. * Availability:
  863. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  864. * CarbonLib: in CarbonLib 1.0 and later
  865. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  866. }
  867. function ResolveAlias( {const} fromFile: FSSpecPtr { can be NULL }; alias: AliasHandle; var target: FSSpec; var wasChanged: Boolean ): OSErr; external name '_ResolveAlias';
  868. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  869. {
  870. * GetAliasInfo() *** DEPRECATED ***
  871. *
  872. * Deprecated:
  873. * Use FSCopyAliasInfo instead.
  874. *
  875. * Summary:
  876. * This call does not work on all aliases. Given an alias handle and
  877. * an index specifying requested alias information type, return the
  878. * information from alias record as a string. An empty string is
  879. * returned when the index is greater than the number of levels
  880. * between the target and root.
  881. *
  882. * Mac OS X threading:
  883. * Thread safe since version 10.0
  884. *
  885. * Availability:
  886. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.3
  887. * CarbonLib: in CarbonLib 1.0 and later
  888. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  889. }
  890. function GetAliasInfo( alias: AliasHandle; itemIndex: AliasInfoType; var theString: Str63 ): OSErr; external name '_GetAliasInfo';
  891. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_3, __IPHONE_NA, __IPHONE_NA) *)
  892. {
  893. * IsAliasFile() *** DEPRECATED ***
  894. *
  895. * Deprecated:
  896. * Use FSIsAliasFile() instead.
  897. *
  898. * Summary:
  899. * Return true if the file pointed to by fileFSSpec is an alias file.
  900. *
  901. * Mac OS X threading:
  902. * Thread safe since version 10.0
  903. *
  904. * Availability:
  905. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  906. * CarbonLib: in CarbonLib 1.0 and later
  907. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  908. }
  909. function IsAliasFile( const (*var*) fileFSSpec: FSSpec; var aliasFileFlag: Boolean; var folderFlag: Boolean ): OSErr; external name '_IsAliasFile';
  910. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  911. {
  912. * ResolveAliasWithMountFlags() *** DEPRECATED ***
  913. *
  914. * Deprecated:
  915. * Use FSResolveAliasWithMountFlags() instead.
  916. *
  917. * Summary:
  918. * Given an AliasHandle, return target file spec. It resolves the
  919. * entire alias chain or one step of the chain. It returns info
  920. * about whether the target is a folder or file; and whether the
  921. * input file spec was an alias or not.
  922. *
  923. * Mac OS X threading:
  924. * Thread safe since version 10.3
  925. *
  926. * Availability:
  927. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  928. * CarbonLib: in CarbonLib 1.0 and later
  929. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  930. }
  931. function ResolveAliasWithMountFlags( {const} fromFile: FSSpecPtr { can be NULL }; alias: AliasHandle; var target: FSSpec; var wasChanged: Boolean; mountFlags: UNSIGNEDLONG ): OSErr; external name '_ResolveAliasWithMountFlags';
  932. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  933. {
  934. * ResolveAliasFile() *** DEPRECATED ***
  935. *
  936. * Deprecated:
  937. * Use FSResolveAliasFile
  938. *
  939. * Summary:
  940. * Given a file spec, return target file spec if input file spec is
  941. * an alias. It resolves the entire alias chain or one step of the
  942. * chain. It returns info about whether the target is a folder or
  943. * file; and whether the input file spec was an alias or not.
  944. *
  945. * Mac OS X threading:
  946. * Thread safe since version 10.3
  947. *
  948. * Availability:
  949. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  950. * CarbonLib: in CarbonLib 1.0 and later
  951. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  952. }
  953. function ResolveAliasFile( var theSpec: FSSpec; resolveAliasChains: Boolean; var targetIsFolder: Boolean; var wasAliased: Boolean ): OSErr; external name '_ResolveAliasFile';
  954. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  955. { Deprecated: Use FSResolveAliasFileWithMountFlags instead}
  956. {
  957. * ResolveAliasFileWithMountFlags() *** DEPRECATED ***
  958. *
  959. * Mac OS X threading:
  960. * Thread safe since version 10.3
  961. *
  962. * Availability:
  963. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  964. * CarbonLib: in CarbonLib 1.0 and later
  965. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  966. }
  967. function ResolveAliasFileWithMountFlags( var theSpec: FSSpec; resolveAliasChains: Boolean; var targetIsFolder: Boolean; var wasAliased: Boolean; mountFlags: UNSIGNEDLONG ): OSErr; external name '_ResolveAliasFileWithMountFlags';
  968. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  969. { Deprecated: Use FSFollowFinderAlias instead}
  970. {
  971. * FollowFinderAlias() *** DEPRECATED ***
  972. *
  973. * Mac OS X threading:
  974. * Thread safe since version 10.3
  975. *
  976. * Availability:
  977. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  978. * CarbonLib: in CarbonLib 1.0 and later
  979. * Non-Carbon CFM: in InterfaceLib 8.5 and later
  980. }
  981. function FollowFinderAlias( {const} fromFile: FSSpecPtr { can be NULL }; alias: AliasHandle; logon: Boolean; var target: FSSpec; var wasChanged: Boolean ): OSErr; external name '_FollowFinderAlias';
  982. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  983. {
  984. Low Level Routines
  985. }
  986. {
  987. * UpdateAlias() *** DEPRECATED ***
  988. *
  989. * Deprecated:
  990. * UseFSUpdateAlias
  991. *
  992. * Summary:
  993. * given a fromFile-target pair and an alias handle, update the
  994. * alias record pointed to by alias handle to represent target as
  995. * the new alias.
  996. *
  997. * Mac OS X threading:
  998. * Thread safe since version 10.3
  999. *
  1000. * Availability:
  1001. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1002. * CarbonLib: in CarbonLib 1.0 and later
  1003. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1004. }
  1005. function UpdateAlias( {const} fromFile: FSSpecPtr { can be NULL }; const (*var*) target: FSSpec; alias: AliasHandle; var wasChanged: Boolean ): OSErr; external name '_UpdateAlias';
  1006. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1007. {
  1008. * MatchAlias() *** DEPRECATED ***
  1009. *
  1010. * Deprecated:
  1011. * Use FSMatchAliasBulk instead
  1012. *
  1013. * Summary:
  1014. * Given an alias handle and fromFile, match the alias and return
  1015. * FSSpecs to the aliased file(s) and needsUpdate flag
  1016. *
  1017. * Mac OS X threading:
  1018. * Thread safe since version 10.3
  1019. *
  1020. * Availability:
  1021. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1022. * CarbonLib: in CarbonLib 1.0 and later
  1023. * Non-Carbon CFM: in InterfaceLib 7.1 and later
  1024. }
  1025. function MatchAlias( {const} fromFile: FSSpecPtr { can be NULL }; rulesMask: UNSIGNEDLONG; alias: AliasHandle; var aliasCount: SInt16; aliasList: FSSpecArrayPtr; var needsUpdate: Boolean; aliasFilter: AliasFilterUPP; yourDataPtr: UnivPtr ): OSErr; external name '_MatchAlias';
  1026. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1027. {
  1028. * ResolveAliasFileWithMountFlagsNoUI() *** DEPRECATED ***
  1029. *
  1030. * Deprecated:
  1031. * Use FSResolveAliasFileWithMountFlags passing in the
  1032. * kResolveAliasFileNoUI flag
  1033. *
  1034. * Summary:
  1035. * variation on ResolveAliasFile that does not prompt user with a
  1036. * dialog
  1037. *
  1038. * Mac OS X threading:
  1039. * Thread safe since version 10.3
  1040. *
  1041. * Availability:
  1042. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.4
  1043. * CarbonLib: in CarbonLib 1.0 and later
  1044. * Non-Carbon CFM: not available
  1045. }
  1046. function ResolveAliasFileWithMountFlagsNoUI( var theSpec: FSSpec; resolveAliasChains: Boolean; var targetIsFolder: Boolean; var wasAliased: Boolean; mountFlags: UNSIGNEDLONG ): OSErr; external name '_ResolveAliasFileWithMountFlagsNoUI';
  1047. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_4, __IPHONE_NA, __IPHONE_NA) *)
  1048. {
  1049. * MatchAliasNoUI() *** DEPRECATED ***
  1050. *
  1051. * Deprecated:
  1052. * Use FSMatchAliasBulk with the kARMNoUI flag instead
  1053. *
  1054. * Summary:
  1055. * variation on MatchAlias that does not prompt user with a dialog
  1056. *
  1057. * Mac OS X threading:
  1058. * Thread safe since version 10.3
  1059. *
  1060. * Availability:
  1061. * Mac OS X: in version 10.0 and later in CoreServices.framework [32-bit only] but deprecated in 10.5
  1062. * CarbonLib: in CarbonLib 1.0 and later
  1063. * Non-Carbon CFM: not available
  1064. }
  1065. function MatchAliasNoUI( {const} fromFile: FSSpecPtr { can be NULL }; rulesMask: UNSIGNEDLONG; alias: AliasHandle; var aliasCount: SInt16; aliasList: FSSpecArrayPtr; var needsUpdate: Boolean; aliasFilter: AliasFilterUPP; yourDataPtr: UnivPtr ): OSErr; external name '_MatchAliasNoUI';
  1066. (* __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_5, __IPHONE_NA, __IPHONE_NA) *)
  1067. {$endc} {not TARGET_CPU_64}
  1068. {$endc} {TARGET_OS_MAC}
  1069. {$ifc not defined MACOSALLINCLUDE or not MACOSALLINCLUDE}
  1070. end.
  1071. {$endc} {not MACOSALLINCLUDE}