ObjFW  Check-in [34fe205b84]

Overview
Comment:OFFileManager: Major API redesign

This removes all query methods and replaces them by a single one that
returns a dictionary. Not only does this allow querying multiple
attributes at once, it is also more extensible, as the previous
attributes were specific to file URLs.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 34fe205b844a13e71fa1075a26b4dade49eafec36154dc8f268c561094521324
User & Date: js on 2017-11-12 18:27:56
Other Links: manifest | tags
Context
2017-11-12
18:49
Update Xcode project to Xcode 9.1 check-in: 3972952ab6 user: js tags: trunk
18:27
OFFileManager: Major API redesign check-in: 34fe205b84 user: js tags: trunk
2017-11-11
23:27
Small optimization for -[isEqual:] check-in: 526feacebc user: js tags: trunk
Changes

Modified ObjFW.xcodeproj/project.pbxproj from [9afe42ac7c] to [ef8c7d8fd8].

45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* End PBXAggregateTarget section */

/* Begin PBXBuildFile section */
		4B0256E4172B60400062B5F1 /* OFStdIOStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B0256E2172B60400062B5F1 /* OFStdIOStream.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B0256E5172B60400062B5F1 /* OFStdIOStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B0256E3172B60400062B5F1 /* OFStdIOStream.m */; };
		4B067FBB177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B067FBC177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */; };
		4B067FBD177BA6F900B8CFDA /* OFChangeOwnerFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FB1177BA6F900B8CFDA /* OFChangeOwnerFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B067FBE177BA6F900B8CFDA /* OFChangeOwnerFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB2177BA6F900B8CFDA /* OFChangeOwnerFailedException.m */; };
		4B067FBF177BA6F900B8CFDA /* OFChangePermissionsFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FB3177BA6F900B8CFDA /* OFChangePermissionsFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B067FC0177BA6F900B8CFDA /* OFChangePermissionsFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB4177BA6F900B8CFDA /* OFChangePermissionsFailedException.m */; };
		4B067FC1177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FB5177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B067FC2177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB6177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m */; };
		4B06855318B2AD3800FC731A /* OFINICategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B06855018B2AD3800FC731A /* OFINICategory.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B06855418B2AD3800FC731A /* OFINICategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B06855118B2AD3800FC731A /* OFINICategory.m */; };
		4B06855518B2AD3800FC731A /* OFINICategory+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B06855218B2AD3800FC731A /* OFINICategory+Private.h */; };
		4B0E296C1DA2A8A400323A76 /* NSArray_OFArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B187E26163EA3DA0049A832 /* NSArray_OFArray.m */; };
		4B0E296D1DA2A8A400323A76 /* NSArray+OFObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B187E28163EA3DA0049A832 /* NSArray+OFObject.m */; };







<
<
<
<







45
46
47
48
49
50
51




52
53
54
55
56
57
58
/* End PBXAggregateTarget section */

/* Begin PBXBuildFile section */
		4B0256E4172B60400062B5F1 /* OFStdIOStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B0256E2172B60400062B5F1 /* OFStdIOStream.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B0256E5172B60400062B5F1 /* OFStdIOStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B0256E3172B60400062B5F1 /* OFStdIOStream.m */; };
		4B067FBB177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B067FBC177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */; };




		4B067FC1177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FB5177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B067FC2177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB6177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m */; };
		4B06855318B2AD3800FC731A /* OFINICategory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B06855018B2AD3800FC731A /* OFINICategory.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B06855418B2AD3800FC731A /* OFINICategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B06855118B2AD3800FC731A /* OFINICategory.m */; };
		4B06855518B2AD3800FC731A /* OFINICategory+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B06855218B2AD3800FC731A /* OFINICategory+Private.h */; };
		4B0E296C1DA2A8A400323A76 /* NSArray_OFArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B187E26163EA3DA0049A832 /* NSArray_OFArray.m */; };
		4B0E296D1DA2A8A400323A76 /* NSArray+OFObject.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B187E28163EA3DA0049A832 /* NSArray+OFObject.m */; };
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
		4B2C21981DA292BE00735907 /* OFAcceptFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B795133AD87D00BD33CB /* OFAcceptFailedException.m */; };
		4B2C21991DA292BE00735907 /* OFObject+KeyValueCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC176251D04963000C32718 /* OFObject+KeyValueCoding.m */; };
		4B2C219A1DA292BE00735907 /* OFAddressTranslationFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B797133AD87D00BD33CB /* OFAddressTranslationFailedException.m */; };
		4B2C219B1DA292BE00735907 /* OFAllocFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF7E133A2D17003E6DCD /* OFAllocFailedException.m */; };
		4B2C219C1DA292BE00735907 /* OFAlreadyConnectedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B788133AD46700BD33CB /* OFAlreadyConnectedException.m */; };
		4B2C219D1DA292BE00735907 /* OFBindFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B799133AD87D00BD33CB /* OFBindFailedException.m */; };
		4B2C219E1DA292BE00735907 /* OFChangeCurrentDirectoryPathFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */; };
		4B2C219F1DA292BE00735907 /* OFChangeOwnerFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB2177BA6F900B8CFDA /* OFChangeOwnerFailedException.m */; };
		4B2C21A01DA292BE00735907 /* OFChangePermissionsFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB4177BA6F900B8CFDA /* OFChangePermissionsFailedException.m */; };
		4B2C21A11DA292BE00735907 /* OFChecksumFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE52D2417B990DA005958D1 /* OFChecksumFailedException.m */; };
		4B2C21A21DA292BE00735907 /* OFConditionBroadcastFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8B1702133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.m */; };
		4B2C21A31DA292BE00735907 /* OFConditionSignalFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8B1704133A3B8E007CD8B3 /* OFConditionSignalFailedException.m */; };
		4B2C21A41DA292BE00735907 /* OFConditionStillWaitingException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7FF3B3133CED6100000324 /* OFConditionStillWaitingException.m */; };
		4B2C21A51DA292BE00735907 /* OFConditionWaitFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8B1706133A3B8E007CD8B3 /* OFConditionWaitFailedException.m */; };
		4B2C21A61DA292BE00735907 /* OFConnectionFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B79B133AD87D00BD33CB /* OFConnectionFailedException.m */; };
		4B2C21A71DA292BE00735907 /* OFCopyItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B62ED1418566FCA0004E0E3 /* OFCopyItemFailedException.m */; };







<
<







326
327
328
329
330
331
332


333
334
335
336
337
338
339
		4B2C21981DA292BE00735907 /* OFAcceptFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B795133AD87D00BD33CB /* OFAcceptFailedException.m */; };
		4B2C21991DA292BE00735907 /* OFObject+KeyValueCoding.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC176251D04963000C32718 /* OFObject+KeyValueCoding.m */; };
		4B2C219A1DA292BE00735907 /* OFAddressTranslationFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B797133AD87D00BD33CB /* OFAddressTranslationFailedException.m */; };
		4B2C219B1DA292BE00735907 /* OFAllocFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF7E133A2D17003E6DCD /* OFAllocFailedException.m */; };
		4B2C219C1DA292BE00735907 /* OFAlreadyConnectedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B788133AD46700BD33CB /* OFAlreadyConnectedException.m */; };
		4B2C219D1DA292BE00735907 /* OFBindFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B799133AD87D00BD33CB /* OFBindFailedException.m */; };
		4B2C219E1DA292BE00735907 /* OFChangeCurrentDirectoryPathFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */; };


		4B2C21A11DA292BE00735907 /* OFChecksumFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE52D2417B990DA005958D1 /* OFChecksumFailedException.m */; };
		4B2C21A21DA292BE00735907 /* OFConditionBroadcastFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8B1702133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.m */; };
		4B2C21A31DA292BE00735907 /* OFConditionSignalFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8B1704133A3B8E007CD8B3 /* OFConditionSignalFailedException.m */; };
		4B2C21A41DA292BE00735907 /* OFConditionStillWaitingException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7FF3B3133CED6100000324 /* OFConditionStillWaitingException.m */; };
		4B2C21A51DA292BE00735907 /* OFConditionWaitFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8B1706133A3B8E007CD8B3 /* OFConditionWaitFailedException.m */; };
		4B2C21A61DA292BE00735907 /* OFConnectionFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B79B133AD87D00BD33CB /* OFConnectionFailedException.m */; };
		4B2C21A71DA292BE00735907 /* OFCopyItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B62ED1418566FCA0004E0E3 /* OFCopyItemFailedException.m */; };
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
		4B2C21BF1DA292BE00735907 /* OFOutOfMemoryException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF82133A2DFB003E6DCD /* OFOutOfMemoryException.m */; };
		4B2C21C01DA292BE00735907 /* OFOutOfRangeException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF7A133A2C15003E6DCD /* OFOutOfRangeException.m */; };
		4B2C21C11DA292BE00735907 /* OFReadFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A10D133AC24500B58A93 /* OFReadFailedException.m */; };
		4B2C21C21DA292BE00735907 /* OFReadOrWriteFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A10F133AC24500B58A93 /* OFReadOrWriteFailedException.m */; };
		4B2C21C31DA292BE00735907 /* OFRemoveItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */; };
		4B2C21C41DA292BE00735907 /* OFSeekFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC3A133AC4E80004B236 /* OFSeekFailedException.m */; };
		4B2C21C51DA292BE00735907 /* OFSetOptionFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B78C133AD46700BD33CB /* OFSetOptionFailedException.m */; };
		4B2C21C61DA292BE00735907 /* OFStatItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B72F7DD1AD9311B00CE253C /* OFStatItemFailedException.m */; };
		4B2C21C71DA292BE00735907 /* OFStillLockedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6743EE163C384A00EB1E59 /* OFStillLockedException.m */; };
		4B2C21C81DA292BE00735907 /* OFThreadJoinFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A0FA133ABEA900B58A93 /* OFThreadJoinFailedException.m */; };
		4B2C21C91DA292BE00735907 /* OFThreadStartFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A0FC133ABEA900B58A93 /* OFThreadStartFailedException.m */; };
		4B2C21CA1DA292BE00735907 /* OFThreadStillRunningException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A0FE133ABEA900B58A93 /* OFThreadStillRunningException.m */; };
		4B2C21CB1DA292BE00735907 /* OFTruncatedDataException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FFA8133A34E1003E6DCD /* OFTruncatedDataException.m */; };
		4B2C21CC1DA292BE00735907 /* OFUnboundNamespaceException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FFB4133A3750003E6DCD /* OFUnboundNamespaceException.m */; };
		4B2C21CD1DA292BE00735907 /* OFUnboundPrefixException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD77FDD176E4BC40031C497 /* OFUnboundPrefixException.m */; };







<







363
364
365
366
367
368
369

370
371
372
373
374
375
376
		4B2C21BF1DA292BE00735907 /* OFOutOfMemoryException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF82133A2DFB003E6DCD /* OFOutOfMemoryException.m */; };
		4B2C21C01DA292BE00735907 /* OFOutOfRangeException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FF7A133A2C15003E6DCD /* OFOutOfRangeException.m */; };
		4B2C21C11DA292BE00735907 /* OFReadFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A10D133AC24500B58A93 /* OFReadFailedException.m */; };
		4B2C21C21DA292BE00735907 /* OFReadOrWriteFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A10F133AC24500B58A93 /* OFReadOrWriteFailedException.m */; };
		4B2C21C31DA292BE00735907 /* OFRemoveItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */; };
		4B2C21C41DA292BE00735907 /* OFSeekFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B29BC3A133AC4E80004B236 /* OFSeekFailedException.m */; };
		4B2C21C51DA292BE00735907 /* OFSetOptionFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B90B78C133AD46700BD33CB /* OFSetOptionFailedException.m */; };

		4B2C21C71DA292BE00735907 /* OFStillLockedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6743EE163C384A00EB1E59 /* OFStillLockedException.m */; };
		4B2C21C81DA292BE00735907 /* OFThreadJoinFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A0FA133ABEA900B58A93 /* OFThreadJoinFailedException.m */; };
		4B2C21C91DA292BE00735907 /* OFThreadStartFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A0FC133ABEA900B58A93 /* OFThreadStartFailedException.m */; };
		4B2C21CA1DA292BE00735907 /* OFThreadStillRunningException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B55A0FE133ABEA900B58A93 /* OFThreadStillRunningException.m */; };
		4B2C21CB1DA292BE00735907 /* OFTruncatedDataException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FFA8133A34E1003E6DCD /* OFTruncatedDataException.m */; };
		4B2C21CC1DA292BE00735907 /* OFUnboundNamespaceException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B17FFB4133A3750003E6DCD /* OFUnboundNamespaceException.m */; };
		4B2C21CD1DA292BE00735907 /* OFUnboundPrefixException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD77FDD176E4BC40031C497 /* OFUnboundPrefixException.m */; };
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
		4B2C22521DA292BE00735907 /* threading.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B67998B1099E7C50041064A /* threading.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22541DA292BE00735907 /* OFAcceptFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B794133AD87D00BD33CB /* OFAcceptFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22551DA292BE00735907 /* OFAddressTranslationFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B796133AD87D00BD33CB /* OFAddressTranslationFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22561DA292BE00735907 /* OFAllocFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF7D133A2D16003E6DCD /* OFAllocFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22571DA292BE00735907 /* OFAlreadyConnectedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B787133AD46700BD33CB /* OFAlreadyConnectedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22581DA292BE00735907 /* OFBindFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B798133AD87D00BD33CB /* OFBindFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22591DA292BE00735907 /* OFChangeCurrentDirectoryPathFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C225A1DA292BE00735907 /* OFChangeOwnerFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FB1177BA6F900B8CFDA /* OFChangeOwnerFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C225B1DA292BE00735907 /* OFChangePermissionsFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FB3177BA6F900B8CFDA /* OFChangePermissionsFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C225C1DA292BE00735907 /* OFChecksumFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BE52D2317B990DA005958D1 /* OFChecksumFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C225D1DA292BE00735907 /* OFConditionBroadcastFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8B1701133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C225E1DA292BE00735907 /* OFConditionSignalFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8B1703133A3B8E007CD8B3 /* OFConditionSignalFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C225F1DA292BE00735907 /* OFConditionStillWaitingException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B7FF3B2133CED6100000324 /* OFConditionStillWaitingException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22601DA292BE00735907 /* OFConditionWaitFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8B1705133A3B8E007CD8B3 /* OFConditionWaitFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22611DA292BE00735907 /* OFConnectionFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B79A133AD87D00BD33CB /* OFConnectionFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22621DA292BE00735907 /* OFCopyItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B62ED1318566FCA0004E0E3 /* OFCopyItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };







<
<







502
503
504
505
506
507
508


509
510
511
512
513
514
515
		4B2C22521DA292BE00735907 /* threading.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B67998B1099E7C50041064A /* threading.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22541DA292BE00735907 /* OFAcceptFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B794133AD87D00BD33CB /* OFAcceptFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22551DA292BE00735907 /* OFAddressTranslationFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B796133AD87D00BD33CB /* OFAddressTranslationFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22561DA292BE00735907 /* OFAllocFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF7D133A2D16003E6DCD /* OFAllocFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22571DA292BE00735907 /* OFAlreadyConnectedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B787133AD46700BD33CB /* OFAlreadyConnectedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22581DA292BE00735907 /* OFBindFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B798133AD87D00BD33CB /* OFBindFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22591DA292BE00735907 /* OFChangeCurrentDirectoryPathFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };


		4B2C225C1DA292BE00735907 /* OFChecksumFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BE52D2317B990DA005958D1 /* OFChecksumFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C225D1DA292BE00735907 /* OFConditionBroadcastFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8B1701133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C225E1DA292BE00735907 /* OFConditionSignalFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8B1703133A3B8E007CD8B3 /* OFConditionSignalFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C225F1DA292BE00735907 /* OFConditionStillWaitingException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B7FF3B2133CED6100000324 /* OFConditionStillWaitingException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22601DA292BE00735907 /* OFConditionWaitFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8B1705133A3B8E007CD8B3 /* OFConditionWaitFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22611DA292BE00735907 /* OFConnectionFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B79A133AD87D00BD33CB /* OFConnectionFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22621DA292BE00735907 /* OFCopyItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B62ED1318566FCA0004E0E3 /* OFCopyItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
		4B2C22791DA292BE00735907 /* OFOutOfMemoryException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF81133A2DFB003E6DCD /* OFOutOfMemoryException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227A1DA292BE00735907 /* OFOutOfRangeException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF79133A2C14003E6DCD /* OFOutOfRangeException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227B1DA292BE00735907 /* OFReadFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A10C133AC24500B58A93 /* OFReadFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227C1DA292BE00735907 /* OFReadOrWriteFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A10E133AC24500B58A93 /* OFReadOrWriteFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227D1DA292BE00735907 /* OFRemoveItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227E1DA292BE00735907 /* OFSeekFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC39133AC4E80004B236 /* OFSeekFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227F1DA292BE00735907 /* OFSetOptionFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B78B133AD46700BD33CB /* OFSetOptionFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22801DA292BE00735907 /* OFStatItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B72F7DC1AD9311B00CE253C /* OFStatItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22811DA292BE00735907 /* OFStillLockedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6743ED163C384A00EB1E59 /* OFStillLockedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22821DA292BE00735907 /* OFTruncatedDataException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FFA7133A34DF003E6DCD /* OFTruncatedDataException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22831DA292BE00735907 /* OFThreadJoinFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A0F9133ABEA900B58A93 /* OFThreadJoinFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22841DA292BE00735907 /* OFThreadStartFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A0FB133ABEA900B58A93 /* OFThreadStartFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22851DA292BE00735907 /* OFThreadStillRunningException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A0FD133ABEA900B58A93 /* OFThreadStillRunningException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22861DA292BE00735907 /* OFUnboundNamespaceException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FFB3133A374C003E6DCD /* OFUnboundNamespaceException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22871DA292BE00735907 /* OFUnboundPrefixException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD77FDC176E4BC40031C497 /* OFUnboundPrefixException.h */; settings = {ATTRIBUTES = (Public, ); }; };







<







538
539
540
541
542
543
544

545
546
547
548
549
550
551
		4B2C22791DA292BE00735907 /* OFOutOfMemoryException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF81133A2DFB003E6DCD /* OFOutOfMemoryException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227A1DA292BE00735907 /* OFOutOfRangeException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FF79133A2C14003E6DCD /* OFOutOfRangeException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227B1DA292BE00735907 /* OFReadFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A10C133AC24500B58A93 /* OFReadFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227C1DA292BE00735907 /* OFReadOrWriteFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A10E133AC24500B58A93 /* OFReadOrWriteFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227D1DA292BE00735907 /* OFRemoveItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227E1DA292BE00735907 /* OFSeekFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B29BC39133AC4E80004B236 /* OFSeekFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C227F1DA292BE00735907 /* OFSetOptionFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B90B78B133AD46700BD33CB /* OFSetOptionFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };

		4B2C22811DA292BE00735907 /* OFStillLockedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6743ED163C384A00EB1E59 /* OFStillLockedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22821DA292BE00735907 /* OFTruncatedDataException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FFA7133A34DF003E6DCD /* OFTruncatedDataException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22831DA292BE00735907 /* OFThreadJoinFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A0F9133ABEA900B58A93 /* OFThreadJoinFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22841DA292BE00735907 /* OFThreadStartFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A0FB133ABEA900B58A93 /* OFThreadStartFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22851DA292BE00735907 /* OFThreadStillRunningException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B55A0FD133ABEA900B58A93 /* OFThreadStillRunningException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22861DA292BE00735907 /* OFUnboundNamespaceException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B17FFB3133A374C003E6DCD /* OFUnboundNamespaceException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B2C22871DA292BE00735907 /* OFUnboundPrefixException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD77FDC176E4BC40031C497 /* OFUnboundPrefixException.h */; settings = {ATTRIBUTES = (Public, ); }; };
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
		4B6C8ADC17BD5C2E00B194F2 /* OFThread+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6C8AD517BD5C2E00B194F2 /* OFThread+Private.h */; };
		4B6C8ADD17BD5C2E00B194F2 /* OFTimer+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6C8AD617BD5C2E00B194F2 /* OFTimer+Private.h */; };
		4B6C8ADE17BD5C2E00B194F2 /* OFZIPArchiveEntry+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6C8AD717BD5C2E00B194F2 /* OFZIPArchiveEntry+Private.h */; };
		4B6D0A891D4459D900901D8D /* OFHMAC.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6D0A871D4459D900901D8D /* OFHMAC.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B6D0A8A1D4459D900901D8D /* OFHMAC.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6D0A881D4459D900901D8D /* OFHMAC.m */; };
		4B7161AD17A6FC7600B74970 /* OFHTTPResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B7161AB17A6FC7600B74970 /* OFHTTPResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B7161AE17A6FC7600B74970 /* OFHTTPResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7161AC17A6FC7600B74970 /* OFHTTPResponse.m */; };
		4B72F7DE1AD9311B00CE253C /* OFStatItemFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B72F7DC1AD9311B00CE253C /* OFStatItemFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B72F7DF1AD9311B00CE253C /* OFStatItemFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B72F7DD1AD9311B00CE253C /* OFStatItemFailedException.m */; };
		4B7327771F93EC3A00E1607F /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B7327731F93EBC400E1607F /* module.modulemap */; };
		4B7327791F93EC5700E1607F /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BEAF52519A8107500B61868 /* module.modulemap */; };
		4B73277B1F93EC6A00E1607F /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B7327731F93EBC400E1607F /* module.modulemap */; };
		4B745BA5168B25E600A6C20E /* OFSystemInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B745BA3168B25E600A6C20E /* OFSystemInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B745BA6168B25E600A6C20E /* OFSystemInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B745BA4168B25E600A6C20E /* OFSystemInfo.m */; };
		4B7769ED1895C07D00D12284 /* resolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B7769EB1895C07D00D12284 /* resolver.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B7769EE1895C07D00D12284 /* resolver.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7769EC1895C07D00D12284 /* resolver.m */; };







<
<







815
816
817
818
819
820
821


822
823
824
825
826
827
828
		4B6C8ADC17BD5C2E00B194F2 /* OFThread+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6C8AD517BD5C2E00B194F2 /* OFThread+Private.h */; };
		4B6C8ADD17BD5C2E00B194F2 /* OFTimer+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6C8AD617BD5C2E00B194F2 /* OFTimer+Private.h */; };
		4B6C8ADE17BD5C2E00B194F2 /* OFZIPArchiveEntry+Private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6C8AD717BD5C2E00B194F2 /* OFZIPArchiveEntry+Private.h */; };
		4B6D0A891D4459D900901D8D /* OFHMAC.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B6D0A871D4459D900901D8D /* OFHMAC.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B6D0A8A1D4459D900901D8D /* OFHMAC.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6D0A881D4459D900901D8D /* OFHMAC.m */; };
		4B7161AD17A6FC7600B74970 /* OFHTTPResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B7161AB17A6FC7600B74970 /* OFHTTPResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B7161AE17A6FC7600B74970 /* OFHTTPResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7161AC17A6FC7600B74970 /* OFHTTPResponse.m */; };


		4B7327771F93EC3A00E1607F /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B7327731F93EBC400E1607F /* module.modulemap */; };
		4B7327791F93EC5700E1607F /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4BEAF52519A8107500B61868 /* module.modulemap */; };
		4B73277B1F93EC6A00E1607F /* module.modulemap in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4B7327731F93EBC400E1607F /* module.modulemap */; };
		4B745BA5168B25E600A6C20E /* OFSystemInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B745BA3168B25E600A6C20E /* OFSystemInfo.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B745BA6168B25E600A6C20E /* OFSystemInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B745BA4168B25E600A6C20E /* OFSystemInfo.m */; };
		4B7769ED1895C07D00D12284 /* resolver.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B7769EB1895C07D00D12284 /* resolver.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4B7769EE1895C07D00D12284 /* resolver.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B7769EC1895C07D00D12284 /* resolver.m */; };
1041
1042
1043
1044
1045
1046
1047








1048
1049
1050
1051
1052
1053
1054
		4BF20C521EEBF5F000C53220 /* OFInflate64Stream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF20C4D1EEBF5F000C53220 /* OFInflate64Stream.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF20C531EEBF5F000C53220 /* OFInflate64Stream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF20C4E1EEBF5F000C53220 /* OFInflate64Stream.m */; };
		4BF20C541EEBF5F000C53220 /* OFInflate64Stream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF20C4E1EEBF5F000C53220 /* OFInflate64Stream.m */; };
		4BF20C551EEBF5F000C53220 /* OFInflateStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF20C4F1EEBF5F000C53220 /* OFInflateStream.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF20C561EEBF5F000C53220 /* OFInflateStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF20C4F1EEBF5F000C53220 /* OFInflateStream.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF20C571EEBF5F000C53220 /* OFInflateStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF20C501EEBF5F000C53220 /* OFInflateStream.m */; };
		4BF20C581EEBF5F000C53220 /* OFInflateStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF20C501EEBF5F000C53220 /* OFInflateStream.m */; };








		4BF33AFB133807590059CEF7 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B3D23761337FBC800DD29B8 /* ObjFW.framework */; };
		4BF33AFC133807A20059CEF7 /* OFArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF66E1235358D0076B512 /* OFArrayTests.m */; };
		4BF33AFD133807A20059CEF7 /* OFBlockTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE5F0E412DF4259005C7A0C /* OFBlockTests.m */; };
		4BF33AFE133807A20059CEF7 /* OFDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF66F1235358D0076B512 /* OFDataTests.m */; };
		4BF33AFF133807A20059CEF7 /* OFDateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE5F0E512DF4259005C7A0C /* OFDateTests.m */; };
		4BF33B00133807A20059CEF7 /* OFDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF6701235358D0076B512 /* OFDictionaryTests.m */; };
		4BF33B03133807A20059CEF7 /* OFListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF6721235358D0076B512 /* OFListTests.m */; };







>
>
>
>
>
>
>
>







1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
		4BF20C521EEBF5F000C53220 /* OFInflate64Stream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF20C4D1EEBF5F000C53220 /* OFInflate64Stream.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF20C531EEBF5F000C53220 /* OFInflate64Stream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF20C4E1EEBF5F000C53220 /* OFInflate64Stream.m */; };
		4BF20C541EEBF5F000C53220 /* OFInflate64Stream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF20C4E1EEBF5F000C53220 /* OFInflate64Stream.m */; };
		4BF20C551EEBF5F000C53220 /* OFInflateStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF20C4F1EEBF5F000C53220 /* OFInflateStream.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF20C561EEBF5F000C53220 /* OFInflateStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF20C4F1EEBF5F000C53220 /* OFInflateStream.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF20C571EEBF5F000C53220 /* OFInflateStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF20C501EEBF5F000C53220 /* OFInflateStream.m */; };
		4BF20C581EEBF5F000C53220 /* OFInflateStream.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF20C501EEBF5F000C53220 /* OFInflateStream.m */; };
		4BF2771D1FB8C113009F8FCF /* OFSetItemAttributesFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF277191FB8C112009F8FCF /* OFSetItemAttributesFailedException.m */; };
		4BF2771E1FB8C113009F8FCF /* OFSetItemAttributesFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF277191FB8C112009F8FCF /* OFSetItemAttributesFailedException.m */; };
		4BF2771F1FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF2771A1FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.m */; };
		4BF277201FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BF2771A1FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.m */; };
		4BF277211FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF2771B1FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF277221FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF2771B1FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF277231FB8C113009F8FCF /* OFSetItemAttributesFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF2771C1FB8C113009F8FCF /* OFSetItemAttributesFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF277241FB8C113009F8FCF /* OFSetItemAttributesFailedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF2771C1FB8C113009F8FCF /* OFSetItemAttributesFailedException.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BF33AFB133807590059CEF7 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B3D23761337FBC800DD29B8 /* ObjFW.framework */; };
		4BF33AFC133807A20059CEF7 /* OFArrayTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF66E1235358D0076B512 /* OFArrayTests.m */; };
		4BF33AFD133807A20059CEF7 /* OFBlockTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE5F0E412DF4259005C7A0C /* OFBlockTests.m */; };
		4BF33AFE133807A20059CEF7 /* OFDataTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF66F1235358D0076B512 /* OFDataTests.m */; };
		4BF33AFF133807A20059CEF7 /* OFDateTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE5F0E512DF4259005C7A0C /* OFDateTests.m */; };
		4BF33B00133807A20059CEF7 /* OFDictionaryTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF6701235358D0076B512 /* OFDictionaryTests.m */; };
		4BF33B03133807A20059CEF7 /* OFListTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B6EF6721235358D0076B512 /* OFListTests.m */; };
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
/* Begin PBXFileReference section */
		4B0108C910EB8C9300631877 /* OFEnumerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFEnumerator.h; path = src/OFEnumerator.h; sourceTree = "<group>"; };
		4B0108CA10EB8C9300631877 /* OFEnumerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFEnumerator.m; path = src/OFEnumerator.m; sourceTree = "<group>"; };
		4B0256E2172B60400062B5F1 /* OFStdIOStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStdIOStream.h; path = src/OFStdIOStream.h; sourceTree = "<group>"; };
		4B0256E3172B60400062B5F1 /* OFStdIOStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStdIOStream.m; path = src/OFStdIOStream.m; sourceTree = "<group>"; };
		4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFChangeCurrentDirectoryPathFailedException.h; path = src/exceptions/OFChangeCurrentDirectoryPathFailedException.h; sourceTree = "<group>"; };
		4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFChangeCurrentDirectoryPathFailedException.m; path = src/exceptions/OFChangeCurrentDirectoryPathFailedException.m; sourceTree = "<group>"; };
		4B067FB1177BA6F900B8CFDA /* OFChangeOwnerFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFChangeOwnerFailedException.h; path = src/exceptions/OFChangeOwnerFailedException.h; sourceTree = "<group>"; };
		4B067FB2177BA6F900B8CFDA /* OFChangeOwnerFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFChangeOwnerFailedException.m; path = src/exceptions/OFChangeOwnerFailedException.m; sourceTree = "<group>"; };
		4B067FB3177BA6F900B8CFDA /* OFChangePermissionsFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFChangePermissionsFailedException.h; path = src/exceptions/OFChangePermissionsFailedException.h; sourceTree = "<group>"; };
		4B067FB4177BA6F900B8CFDA /* OFChangePermissionsFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFChangePermissionsFailedException.m; path = src/exceptions/OFChangePermissionsFailedException.m; sourceTree = "<group>"; };
		4B067FB5177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFCreateSymbolicLinkFailedException.h; path = src/exceptions/OFCreateSymbolicLinkFailedException.h; sourceTree = "<group>"; };
		4B067FB6177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFCreateSymbolicLinkFailedException.m; path = src/exceptions/OFCreateSymbolicLinkFailedException.m; sourceTree = "<group>"; };
		4B06855018B2AD3800FC731A /* OFINICategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFINICategory.h; path = src/OFINICategory.h; sourceTree = "<group>"; };
		4B06855118B2AD3800FC731A /* OFINICategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFINICategory.m; path = src/OFINICategory.m; sourceTree = "<group>"; };
		4B06855218B2AD3800FC731A /* OFINICategory+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFINICategory+Private.h"; path = "src/OFINICategory+Private.h"; sourceTree = "<group>"; };
		4B0D249411DFAA3D00ED6FFC /* OFXMLElementBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLElementBuilder.h; path = src/OFXMLElementBuilder.h; sourceTree = "<group>"; };
		4B0D249511DFAA3D00ED6FFC /* OFXMLElementBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLElementBuilder.m; path = src/OFXMLElementBuilder.m; sourceTree = "<group>"; };







<
<
<
<







1248
1249
1250
1251
1252
1253
1254




1255
1256
1257
1258
1259
1260
1261
/* Begin PBXFileReference section */
		4B0108C910EB8C9300631877 /* OFEnumerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFEnumerator.h; path = src/OFEnumerator.h; sourceTree = "<group>"; };
		4B0108CA10EB8C9300631877 /* OFEnumerator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFEnumerator.m; path = src/OFEnumerator.m; sourceTree = "<group>"; };
		4B0256E2172B60400062B5F1 /* OFStdIOStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStdIOStream.h; path = src/OFStdIOStream.h; sourceTree = "<group>"; };
		4B0256E3172B60400062B5F1 /* OFStdIOStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStdIOStream.m; path = src/OFStdIOStream.m; sourceTree = "<group>"; };
		4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFChangeCurrentDirectoryPathFailedException.h; path = src/exceptions/OFChangeCurrentDirectoryPathFailedException.h; sourceTree = "<group>"; };
		4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFChangeCurrentDirectoryPathFailedException.m; path = src/exceptions/OFChangeCurrentDirectoryPathFailedException.m; sourceTree = "<group>"; };




		4B067FB5177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFCreateSymbolicLinkFailedException.h; path = src/exceptions/OFCreateSymbolicLinkFailedException.h; sourceTree = "<group>"; };
		4B067FB6177BA6F900B8CFDA /* OFCreateSymbolicLinkFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFCreateSymbolicLinkFailedException.m; path = src/exceptions/OFCreateSymbolicLinkFailedException.m; sourceTree = "<group>"; };
		4B06855018B2AD3800FC731A /* OFINICategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFINICategory.h; path = src/OFINICategory.h; sourceTree = "<group>"; };
		4B06855118B2AD3800FC731A /* OFINICategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFINICategory.m; path = src/OFINICategory.m; sourceTree = "<group>"; };
		4B06855218B2AD3800FC731A /* OFINICategory+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "OFINICategory+Private.h"; path = "src/OFINICategory+Private.h"; sourceTree = "<group>"; };
		4B0D249411DFAA3D00ED6FFC /* OFXMLElementBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLElementBuilder.h; path = src/OFXMLElementBuilder.h; sourceTree = "<group>"; };
		4B0D249511DFAA3D00ED6FFC /* OFXMLElementBuilder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLElementBuilder.m; path = src/OFXMLElementBuilder.m; sourceTree = "<group>"; };
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
		4B6EF67E1235358D0076B512 /* OFXMLParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLParserTests.m; path = tests/OFXMLParserTests.m; sourceTree = SOURCE_ROOT; };
		4B6EF6801235358D0076B512 /* TestsAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestsAppDelegate.h; path = tests/TestsAppDelegate.h; sourceTree = SOURCE_ROOT; };
		4B6EF6811235358D0076B512 /* TestsAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestsAppDelegate.m; path = tests/TestsAppDelegate.m; sourceTree = SOURCE_ROOT; };
		4B6EF684123535B60076B512 /* TestPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestPlugin.m; path = tests/plugin/TestPlugin.m; sourceTree = SOURCE_ROOT; };
		4B6EF685123535C80076B512 /* test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = test.m; path = tests/objc_sync/test.m; sourceTree = SOURCE_ROOT; };
		4B7161AB17A6FC7600B74970 /* OFHTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFHTTPResponse.h; path = src/OFHTTPResponse.h; sourceTree = "<group>"; };
		4B7161AC17A6FC7600B74970 /* OFHTTPResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFHTTPResponse.m; path = src/OFHTTPResponse.m; sourceTree = "<group>"; };
		4B72F7DC1AD9311B00CE253C /* OFStatItemFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFStatItemFailedException.h; path = src/exceptions/OFStatItemFailedException.h; sourceTree = "<group>"; };
		4B72F7DD1AD9311B00CE253C /* OFStatItemFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFStatItemFailedException.m; path = src/exceptions/OFStatItemFailedException.m; sourceTree = "<group>"; };
		4B7327731F93EBC400E1607F /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; name = module.modulemap; path = src/bridge/module.modulemap; sourceTree = "<group>"; };
		4B745BA3168B25E600A6C20E /* OFSystemInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFSystemInfo.h; path = src/OFSystemInfo.h; sourceTree = "<group>"; };
		4B745BA4168B25E600A6C20E /* OFSystemInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFSystemInfo.m; path = src/OFSystemInfo.m; sourceTree = "<group>"; };
		4B76F4751DA2C2BB00CFF831 /* Tests (iOS).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Tests (iOS).app"; sourceTree = BUILT_PRODUCTS_DIR; };
		4B7769EB1895C07D00D12284 /* resolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = resolver.h; path = src/resolver.h; sourceTree = "<group>"; };
		4B7769EC1895C07D00D12284 /* resolver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = resolver.m; path = src/resolver.m; sourceTree = "<group>"; };
		4B7769EF1895ED0C00D12284 /* OFUDPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFUDPSocket.h; path = src/OFUDPSocket.h; sourceTree = "<group>"; };







<
<







1575
1576
1577
1578
1579
1580
1581


1582
1583
1584
1585
1586
1587
1588
		4B6EF67E1235358D0076B512 /* OFXMLParserTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLParserTests.m; path = tests/OFXMLParserTests.m; sourceTree = SOURCE_ROOT; };
		4B6EF6801235358D0076B512 /* TestsAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestsAppDelegate.h; path = tests/TestsAppDelegate.h; sourceTree = SOURCE_ROOT; };
		4B6EF6811235358D0076B512 /* TestsAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestsAppDelegate.m; path = tests/TestsAppDelegate.m; sourceTree = SOURCE_ROOT; };
		4B6EF684123535B60076B512 /* TestPlugin.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TestPlugin.m; path = tests/plugin/TestPlugin.m; sourceTree = SOURCE_ROOT; };
		4B6EF685123535C80076B512 /* test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = test.m; path = tests/objc_sync/test.m; sourceTree = SOURCE_ROOT; };
		4B7161AB17A6FC7600B74970 /* OFHTTPResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFHTTPResponse.h; path = src/OFHTTPResponse.h; sourceTree = "<group>"; };
		4B7161AC17A6FC7600B74970 /* OFHTTPResponse.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFHTTPResponse.m; path = src/OFHTTPResponse.m; sourceTree = "<group>"; };


		4B7327731F93EBC400E1607F /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; name = module.modulemap; path = src/bridge/module.modulemap; sourceTree = "<group>"; };
		4B745BA3168B25E600A6C20E /* OFSystemInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFSystemInfo.h; path = src/OFSystemInfo.h; sourceTree = "<group>"; };
		4B745BA4168B25E600A6C20E /* OFSystemInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFSystemInfo.m; path = src/OFSystemInfo.m; sourceTree = "<group>"; };
		4B76F4751DA2C2BB00CFF831 /* Tests (iOS).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Tests (iOS).app"; sourceTree = BUILT_PRODUCTS_DIR; };
		4B7769EB1895C07D00D12284 /* resolver.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = resolver.h; path = src/resolver.h; sourceTree = "<group>"; };
		4B7769EC1895C07D00D12284 /* resolver.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = resolver.m; path = src/resolver.m; sourceTree = "<group>"; };
		4B7769EF1895ED0C00D12284 /* OFUDPSocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFUDPSocket.h; path = src/OFUDPSocket.h; sourceTree = "<group>"; };
1777
1778
1779
1780
1781
1782
1783




1784
1785
1786
1787
1788
1789
1790
		4BF1BCCD11C9663F0025511F /* OFString+XMLUnescaping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFString+XMLUnescaping.m"; path = "src/OFString+XMLUnescaping.m"; sourceTree = "<group>"; };
		4BF1BCCE11C9663F0025511F /* OFXMLAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLAttribute.h; path = src/OFXMLAttribute.h; sourceTree = "<group>"; };
		4BF1BCCF11C9663F0025511F /* OFXMLAttribute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLAttribute.m; path = src/OFXMLAttribute.m; sourceTree = "<group>"; };
		4BF20C4D1EEBF5F000C53220 /* OFInflate64Stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFInflate64Stream.h; path = src/OFInflate64Stream.h; sourceTree = "<group>"; };
		4BF20C4E1EEBF5F000C53220 /* OFInflate64Stream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFInflate64Stream.m; path = src/OFInflate64Stream.m; sourceTree = "<group>"; };
		4BF20C4F1EEBF5F000C53220 /* OFInflateStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFInflateStream.h; path = src/OFInflateStream.h; sourceTree = "<group>"; };
		4BF20C501EEBF5F000C53220 /* OFInflateStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFInflateStream.m; path = src/OFInflateStream.m; sourceTree = "<group>"; };




		4BF33AF0133807310059CEF7 /* Tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tests; sourceTree = BUILT_PRODUCTS_DIR; };
		4BF33B4213380CD40059CEF7 /* testfile.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = testfile.bin; path = tests/testfile.bin; sourceTree = "<group>"; };
		4BF33B4313380CD40059CEF7 /* testfile.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = testfile.txt; path = tests/testfile.txt; sourceTree = "<group>"; };
		4BF3A2281E25EA48002EA46F /* windows-1251.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "windows-1251.m"; path = "src/encodings/windows-1251.m"; sourceTree = "<group>"; };
		4BF5CB8F1E2DC1D800CF7584 /* iso_8859-2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "iso_8859-2.m"; path = "src/encodings/iso_8859-2.m"; sourceTree = "<group>"; };
		4BF69CE51BD44F8B00DFFC1B /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = platform.h; path = src/platform.h; sourceTree = "<group>"; };
		4BF8FE541F9A97E100CB9F9C /* OFException+Swift.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFException+Swift.m"; path = "src/bridge/OFException+Swift.m"; sourceTree = "<group>"; };







>
>
>
>







1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
		4BF1BCCD11C9663F0025511F /* OFString+XMLUnescaping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFString+XMLUnescaping.m"; path = "src/OFString+XMLUnescaping.m"; sourceTree = "<group>"; };
		4BF1BCCE11C9663F0025511F /* OFXMLAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFXMLAttribute.h; path = src/OFXMLAttribute.h; sourceTree = "<group>"; };
		4BF1BCCF11C9663F0025511F /* OFXMLAttribute.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFXMLAttribute.m; path = src/OFXMLAttribute.m; sourceTree = "<group>"; };
		4BF20C4D1EEBF5F000C53220 /* OFInflate64Stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFInflate64Stream.h; path = src/OFInflate64Stream.h; sourceTree = "<group>"; };
		4BF20C4E1EEBF5F000C53220 /* OFInflate64Stream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFInflate64Stream.m; path = src/OFInflate64Stream.m; sourceTree = "<group>"; };
		4BF20C4F1EEBF5F000C53220 /* OFInflateStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFInflateStream.h; path = src/OFInflateStream.h; sourceTree = "<group>"; };
		4BF20C501EEBF5F000C53220 /* OFInflateStream.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFInflateStream.m; path = src/OFInflateStream.m; sourceTree = "<group>"; };
		4BF277191FB8C112009F8FCF /* OFSetItemAttributesFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFSetItemAttributesFailedException.m; path = src/exceptions/OFSetItemAttributesFailedException.m; sourceTree = "<group>"; };
		4BF2771A1FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OFRetrieveItemAttributesFailedException.m; path = src/exceptions/OFRetrieveItemAttributesFailedException.m; sourceTree = "<group>"; };
		4BF2771B1FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFRetrieveItemAttributesFailedException.h; path = src/exceptions/OFRetrieveItemAttributesFailedException.h; sourceTree = "<group>"; };
		4BF2771C1FB8C113009F8FCF /* OFSetItemAttributesFailedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OFSetItemAttributesFailedException.h; path = src/exceptions/OFSetItemAttributesFailedException.h; sourceTree = "<group>"; };
		4BF33AF0133807310059CEF7 /* Tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = Tests; sourceTree = BUILT_PRODUCTS_DIR; };
		4BF33B4213380CD40059CEF7 /* testfile.bin */ = {isa = PBXFileReference; lastKnownFileType = archive.macbinary; name = testfile.bin; path = tests/testfile.bin; sourceTree = "<group>"; };
		4BF33B4313380CD40059CEF7 /* testfile.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = testfile.txt; path = tests/testfile.txt; sourceTree = "<group>"; };
		4BF3A2281E25EA48002EA46F /* windows-1251.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "windows-1251.m"; path = "src/encodings/windows-1251.m"; sourceTree = "<group>"; };
		4BF5CB8F1E2DC1D800CF7584 /* iso_8859-2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "iso_8859-2.m"; path = "src/encodings/iso_8859-2.m"; sourceTree = "<group>"; };
		4BF69CE51BD44F8B00DFFC1B /* platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = platform.h; path = src/platform.h; sourceTree = "<group>"; };
		4BF8FE541F9A97E100CB9F9C /* OFException+Swift.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "OFException+Swift.m"; path = "src/bridge/OFException+Swift.m"; sourceTree = "<group>"; };
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
				4B17FF7E133A2D17003E6DCD /* OFAllocFailedException.m */,
				4B90B787133AD46700BD33CB /* OFAlreadyConnectedException.h */,
				4B90B788133AD46700BD33CB /* OFAlreadyConnectedException.m */,
				4B90B798133AD87D00BD33CB /* OFBindFailedException.h */,
				4B90B799133AD87D00BD33CB /* OFBindFailedException.m */,
				4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */,
				4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */,
				4B067FB1177BA6F900B8CFDA /* OFChangeOwnerFailedException.h */,
				4B067FB2177BA6F900B8CFDA /* OFChangeOwnerFailedException.m */,
				4B067FB3177BA6F900B8CFDA /* OFChangePermissionsFailedException.h */,
				4B067FB4177BA6F900B8CFDA /* OFChangePermissionsFailedException.m */,
				4BE52D2317B990DA005958D1 /* OFChecksumFailedException.h */,
				4BE52D2417B990DA005958D1 /* OFChecksumFailedException.m */,
				4B8B1701133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.h */,
				4B8B1702133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.m */,
				4B8B1703133A3B8E007CD8B3 /* OFConditionSignalFailedException.h */,
				4B8B1704133A3B8E007CD8B3 /* OFConditionSignalFailedException.m */,
				4B7FF3B2133CED6100000324 /* OFConditionStillWaitingException.h */,







<
<
<
<







1880
1881
1882
1883
1884
1885
1886




1887
1888
1889
1890
1891
1892
1893
				4B17FF7E133A2D17003E6DCD /* OFAllocFailedException.m */,
				4B90B787133AD46700BD33CB /* OFAlreadyConnectedException.h */,
				4B90B788133AD46700BD33CB /* OFAlreadyConnectedException.m */,
				4B90B798133AD87D00BD33CB /* OFBindFailedException.h */,
				4B90B799133AD87D00BD33CB /* OFBindFailedException.m */,
				4B067FAF177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h */,
				4B067FB0177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m */,




				4BE52D2317B990DA005958D1 /* OFChecksumFailedException.h */,
				4BE52D2417B990DA005958D1 /* OFChecksumFailedException.m */,
				4B8B1701133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.h */,
				4B8B1702133A3B8E007CD8B3 /* OFConditionBroadcastFailedException.m */,
				4B8B1703133A3B8E007CD8B3 /* OFConditionSignalFailedException.h */,
				4B8B1704133A3B8E007CD8B3 /* OFConditionSignalFailedException.m */,
				4B7FF3B2133CED6100000324 /* OFConditionStillWaitingException.h */,
1960
1961
1962
1963
1964
1965
1966


1967
1968
1969
1970


1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
				4B17FF7A133A2C15003E6DCD /* OFOutOfRangeException.m */,
				4B55A10C133AC24500B58A93 /* OFReadFailedException.h */,
				4B55A10D133AC24500B58A93 /* OFReadFailedException.m */,
				4B55A10E133AC24500B58A93 /* OFReadOrWriteFailedException.h */,
				4B55A10F133AC24500B58A93 /* OFReadOrWriteFailedException.m */,
				4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */,
				4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */,


				4B14EAC51E9A8292005E8BFD /* OFSandboxActivationFailedException.h */,
				4B14EAC61E9A8292005E8BFD /* OFSandboxActivationFailedException.m */,
				4B29BC39133AC4E80004B236 /* OFSeekFailedException.h */,
				4B29BC3A133AC4E80004B236 /* OFSeekFailedException.m */,


				4B90B78B133AD46700BD33CB /* OFSetOptionFailedException.h */,
				4B90B78C133AD46700BD33CB /* OFSetOptionFailedException.m */,
				4B72F7DC1AD9311B00CE253C /* OFStatItemFailedException.h */,
				4B72F7DD1AD9311B00CE253C /* OFStatItemFailedException.m */,
				4B6743ED163C384A00EB1E59 /* OFStillLockedException.h */,
				4B6743EE163C384A00EB1E59 /* OFStillLockedException.m */,
				4B55A0F9133ABEA900B58A93 /* OFThreadJoinFailedException.h */,
				4B55A0FA133ABEA900B58A93 /* OFThreadJoinFailedException.m */,
				4B55A0FB133ABEA900B58A93 /* OFThreadStartFailedException.h */,
				4B55A0FC133ABEA900B58A93 /* OFThreadStartFailedException.m */,
				4B55A0FD133ABEA900B58A93 /* OFThreadStillRunningException.h */,







>
>




>
>


<
<







1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966


1967
1968
1969
1970
1971
1972
1973
				4B17FF7A133A2C15003E6DCD /* OFOutOfRangeException.m */,
				4B55A10C133AC24500B58A93 /* OFReadFailedException.h */,
				4B55A10D133AC24500B58A93 /* OFReadFailedException.m */,
				4B55A10E133AC24500B58A93 /* OFReadOrWriteFailedException.h */,
				4B55A10F133AC24500B58A93 /* OFReadOrWriteFailedException.m */,
				4BFF3710177E17C100192782 /* OFRemoveItemFailedException.h */,
				4BFF3711177E17C100192782 /* OFRemoveItemFailedException.m */,
				4BF2771B1FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.h */,
				4BF2771A1FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.m */,
				4B14EAC51E9A8292005E8BFD /* OFSandboxActivationFailedException.h */,
				4B14EAC61E9A8292005E8BFD /* OFSandboxActivationFailedException.m */,
				4B29BC39133AC4E80004B236 /* OFSeekFailedException.h */,
				4B29BC3A133AC4E80004B236 /* OFSeekFailedException.m */,
				4BF2771C1FB8C113009F8FCF /* OFSetItemAttributesFailedException.h */,
				4BF277191FB8C112009F8FCF /* OFSetItemAttributesFailedException.m */,
				4B90B78B133AD46700BD33CB /* OFSetOptionFailedException.h */,
				4B90B78C133AD46700BD33CB /* OFSetOptionFailedException.m */,


				4B6743ED163C384A00EB1E59 /* OFStillLockedException.h */,
				4B6743EE163C384A00EB1E59 /* OFStillLockedException.m */,
				4B55A0F9133ABEA900B58A93 /* OFThreadJoinFailedException.h */,
				4B55A0FA133ABEA900B58A93 /* OFThreadJoinFailedException.m */,
				4B55A0FB133ABEA900B58A93 /* OFThreadStartFailedException.h */,
				4B55A0FC133ABEA900B58A93 /* OFThreadStartFailedException.m */,
				4B55A0FD133ABEA900B58A93 /* OFThreadStillRunningException.h */,
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
				4B2C22521DA292BE00735907 /* threading.h in Headers */,
				4B2C22541DA292BE00735907 /* OFAcceptFailedException.h in Headers */,
				4B2C22551DA292BE00735907 /* OFAddressTranslationFailedException.h in Headers */,
				4B2C22561DA292BE00735907 /* OFAllocFailedException.h in Headers */,
				4B2C22571DA292BE00735907 /* OFAlreadyConnectedException.h in Headers */,
				4B2C22581DA292BE00735907 /* OFBindFailedException.h in Headers */,
				4B2C22591DA292BE00735907 /* OFChangeCurrentDirectoryPathFailedException.h in Headers */,
				4B2C225A1DA292BE00735907 /* OFChangeOwnerFailedException.h in Headers */,
				4B2C225B1DA292BE00735907 /* OFChangePermissionsFailedException.h in Headers */,
				4B2C225C1DA292BE00735907 /* OFChecksumFailedException.h in Headers */,
				4B2C225D1DA292BE00735907 /* OFConditionBroadcastFailedException.h in Headers */,
				4B2C225E1DA292BE00735907 /* OFConditionSignalFailedException.h in Headers */,
				4B2C225F1DA292BE00735907 /* OFConditionStillWaitingException.h in Headers */,
				4B2C22601DA292BE00735907 /* OFConditionWaitFailedException.h in Headers */,
				4B2C22611DA292BE00735907 /* OFConnectionFailedException.h in Headers */,
				4B2C22621DA292BE00735907 /* OFCopyItemFailedException.h in Headers */,







<
<







2726
2727
2728
2729
2730
2731
2732


2733
2734
2735
2736
2737
2738
2739
				4B2C22521DA292BE00735907 /* threading.h in Headers */,
				4B2C22541DA292BE00735907 /* OFAcceptFailedException.h in Headers */,
				4B2C22551DA292BE00735907 /* OFAddressTranslationFailedException.h in Headers */,
				4B2C22561DA292BE00735907 /* OFAllocFailedException.h in Headers */,
				4B2C22571DA292BE00735907 /* OFAlreadyConnectedException.h in Headers */,
				4B2C22581DA292BE00735907 /* OFBindFailedException.h in Headers */,
				4B2C22591DA292BE00735907 /* OFChangeCurrentDirectoryPathFailedException.h in Headers */,


				4B2C225C1DA292BE00735907 /* OFChecksumFailedException.h in Headers */,
				4B2C225D1DA292BE00735907 /* OFConditionBroadcastFailedException.h in Headers */,
				4B2C225E1DA292BE00735907 /* OFConditionSignalFailedException.h in Headers */,
				4B2C225F1DA292BE00735907 /* OFConditionStillWaitingException.h in Headers */,
				4B2C22601DA292BE00735907 /* OFConditionWaitFailedException.h in Headers */,
				4B2C22611DA292BE00735907 /* OFConnectionFailedException.h in Headers */,
				4B2C22621DA292BE00735907 /* OFCopyItemFailedException.h in Headers */,
2770
2771
2772
2773
2774
2775
2776

2777
2778

2779
2780
2781
2782
2783
2784
2785
2786
2787
				4B2C22771DA292BE00735907 /* OFObserveFailedException.h in Headers */,
				4B2C22781DA292BE00735907 /* OFOpenItemFailedException.h in Headers */,
				4B2C22791DA292BE00735907 /* OFOutOfMemoryException.h in Headers */,
				4B2C227A1DA292BE00735907 /* OFOutOfRangeException.h in Headers */,
				4B2C227B1DA292BE00735907 /* OFReadFailedException.h in Headers */,
				4B2C227C1DA292BE00735907 /* OFReadOrWriteFailedException.h in Headers */,
				4B2C227D1DA292BE00735907 /* OFRemoveItemFailedException.h in Headers */,

				4B14EAC81E9A8292005E8BFD /* OFSandboxActivationFailedException.h in Headers */,
				4B2C227E1DA292BE00735907 /* OFSeekFailedException.h in Headers */,

				4B2C227F1DA292BE00735907 /* OFSetOptionFailedException.h in Headers */,
				4B2C22801DA292BE00735907 /* OFStatItemFailedException.h in Headers */,
				4B2C22811DA292BE00735907 /* OFStillLockedException.h in Headers */,
				4B2C22821DA292BE00735907 /* OFTruncatedDataException.h in Headers */,
				4B2C22831DA292BE00735907 /* OFThreadJoinFailedException.h in Headers */,
				4B2C22841DA292BE00735907 /* OFThreadStartFailedException.h in Headers */,
				4B2C22851DA292BE00735907 /* OFThreadStillRunningException.h in Headers */,
				4B2C22861DA292BE00735907 /* OFUnboundNamespaceException.h in Headers */,
				4B2C22871DA292BE00735907 /* OFUnboundPrefixException.h in Headers */,







>


>

<







2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771

2772
2773
2774
2775
2776
2777
2778
				4B2C22771DA292BE00735907 /* OFObserveFailedException.h in Headers */,
				4B2C22781DA292BE00735907 /* OFOpenItemFailedException.h in Headers */,
				4B2C22791DA292BE00735907 /* OFOutOfMemoryException.h in Headers */,
				4B2C227A1DA292BE00735907 /* OFOutOfRangeException.h in Headers */,
				4B2C227B1DA292BE00735907 /* OFReadFailedException.h in Headers */,
				4B2C227C1DA292BE00735907 /* OFReadOrWriteFailedException.h in Headers */,
				4B2C227D1DA292BE00735907 /* OFRemoveItemFailedException.h in Headers */,
				4BF277221FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.h in Headers */,
				4B14EAC81E9A8292005E8BFD /* OFSandboxActivationFailedException.h in Headers */,
				4B2C227E1DA292BE00735907 /* OFSeekFailedException.h in Headers */,
				4BF277241FB8C113009F8FCF /* OFSetItemAttributesFailedException.h in Headers */,
				4B2C227F1DA292BE00735907 /* OFSetOptionFailedException.h in Headers */,

				4B2C22811DA292BE00735907 /* OFStillLockedException.h in Headers */,
				4B2C22821DA292BE00735907 /* OFTruncatedDataException.h in Headers */,
				4B2C22831DA292BE00735907 /* OFThreadJoinFailedException.h in Headers */,
				4B2C22841DA292BE00735907 /* OFThreadStartFailedException.h in Headers */,
				4B2C22851DA292BE00735907 /* OFThreadStillRunningException.h in Headers */,
				4B2C22861DA292BE00735907 /* OFUnboundNamespaceException.h in Headers */,
				4B2C22871DA292BE00735907 /* OFUnboundPrefixException.h in Headers */,
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
				4B3D23EA1337FCB000DD29B8 /* threading.h in Headers */,
				4B90B79E133AD87D00BD33CB /* OFAcceptFailedException.h in Headers */,
				4B90B7A0133AD87D00BD33CB /* OFAddressTranslationFailedException.h in Headers */,
				4B17FF7F133A2D17003E6DCD /* OFAllocFailedException.h in Headers */,
				4B90B78D133AD46700BD33CB /* OFAlreadyConnectedException.h in Headers */,
				4B90B7A2133AD87D00BD33CB /* OFBindFailedException.h in Headers */,
				4B067FBB177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h in Headers */,
				4B067FBD177BA6F900B8CFDA /* OFChangeOwnerFailedException.h in Headers */,
				4B067FBF177BA6F900B8CFDA /* OFChangePermissionsFailedException.h in Headers */,
				4BE52D2517B990DA005958D1 /* OFChecksumFailedException.h in Headers */,
				4B29BC58133AC8540004B236 /* OFConditionBroadcastFailedException.h in Headers */,
				4B29BC59133AC8540004B236 /* OFConditionSignalFailedException.h in Headers */,
				4B7FF3B4133CED6200000324 /* OFConditionStillWaitingException.h in Headers */,
				4B29BC5A133AC8540004B236 /* OFConditionWaitFailedException.h in Headers */,
				4B90B7A4133AD87D00BD33CB /* OFConnectionFailedException.h in Headers */,
				4B62ED1518566FCA0004E0E3 /* OFCopyItemFailedException.h in Headers */,







<
<







2964
2965
2966
2967
2968
2969
2970


2971
2972
2973
2974
2975
2976
2977
				4B3D23EA1337FCB000DD29B8 /* threading.h in Headers */,
				4B90B79E133AD87D00BD33CB /* OFAcceptFailedException.h in Headers */,
				4B90B7A0133AD87D00BD33CB /* OFAddressTranslationFailedException.h in Headers */,
				4B17FF7F133A2D17003E6DCD /* OFAllocFailedException.h in Headers */,
				4B90B78D133AD46700BD33CB /* OFAlreadyConnectedException.h in Headers */,
				4B90B7A2133AD87D00BD33CB /* OFBindFailedException.h in Headers */,
				4B067FBB177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.h in Headers */,


				4BE52D2517B990DA005958D1 /* OFChecksumFailedException.h in Headers */,
				4B29BC58133AC8540004B236 /* OFConditionBroadcastFailedException.h in Headers */,
				4B29BC59133AC8540004B236 /* OFConditionSignalFailedException.h in Headers */,
				4B7FF3B4133CED6200000324 /* OFConditionStillWaitingException.h in Headers */,
				4B29BC5A133AC8540004B236 /* OFConditionWaitFailedException.h in Headers */,
				4B90B7A4133AD87D00BD33CB /* OFConnectionFailedException.h in Headers */,
				4B62ED1518566FCA0004E0E3 /* OFCopyItemFailedException.h in Headers */,
3009
3010
3011
3012
3013
3014
3015

3016
3017

3018
3019
3020
3021
3022
3023
3024
3025
3026
				4B35C64E1ADAD30A003DB666 /* OFObserveFailedException.h in Headers */,
				4B55A10A133AC05100B58A93 /* OFOpenItemFailedException.h in Headers */,
				4B17FF83133A2DFB003E6DCD /* OFOutOfMemoryException.h in Headers */,
				4B17FF7B133A2C15003E6DCD /* OFOutOfRangeException.h in Headers */,
				4B55A112133AC24600B58A93 /* OFReadFailedException.h in Headers */,
				4B55A114133AC24600B58A93 /* OFReadOrWriteFailedException.h in Headers */,
				4BFF3714177E17C100192782 /* OFRemoveItemFailedException.h in Headers */,

				4B14EAC71E9A8292005E8BFD /* OFSandboxActivationFailedException.h in Headers */,
				4B29BC41133AC4E80004B236 /* OFSeekFailedException.h in Headers */,

				4B90B791133AD46700BD33CB /* OFSetOptionFailedException.h in Headers */,
				4B72F7DE1AD9311B00CE253C /* OFStatItemFailedException.h in Headers */,
				4B6743F3163C384A00EB1E59 /* OFStillLockedException.h in Headers */,
				4B17FFA9133A34E7003E6DCD /* OFTruncatedDataException.h in Headers */,
				4B55A0FF133ABEA900B58A93 /* OFThreadJoinFailedException.h in Headers */,
				4B55A101133ABEA900B58A93 /* OFThreadStartFailedException.h in Headers */,
				4B55A103133ABEA900B58A93 /* OFThreadStillRunningException.h in Headers */,
				4B17FFB5133A375B003E6DCD /* OFUnboundNamespaceException.h in Headers */,
				4BD77FDE176E4BC40031C497 /* OFUnboundPrefixException.h in Headers */,







>


>

<







2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009

3010
3011
3012
3013
3014
3015
3016
				4B35C64E1ADAD30A003DB666 /* OFObserveFailedException.h in Headers */,
				4B55A10A133AC05100B58A93 /* OFOpenItemFailedException.h in Headers */,
				4B17FF83133A2DFB003E6DCD /* OFOutOfMemoryException.h in Headers */,
				4B17FF7B133A2C15003E6DCD /* OFOutOfRangeException.h in Headers */,
				4B55A112133AC24600B58A93 /* OFReadFailedException.h in Headers */,
				4B55A114133AC24600B58A93 /* OFReadOrWriteFailedException.h in Headers */,
				4BFF3714177E17C100192782 /* OFRemoveItemFailedException.h in Headers */,
				4BF277211FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.h in Headers */,
				4B14EAC71E9A8292005E8BFD /* OFSandboxActivationFailedException.h in Headers */,
				4B29BC41133AC4E80004B236 /* OFSeekFailedException.h in Headers */,
				4BF277231FB8C113009F8FCF /* OFSetItemAttributesFailedException.h in Headers */,
				4B90B791133AD46700BD33CB /* OFSetOptionFailedException.h in Headers */,

				4B6743F3163C384A00EB1E59 /* OFStillLockedException.h in Headers */,
				4B17FFA9133A34E7003E6DCD /* OFTruncatedDataException.h in Headers */,
				4B55A0FF133ABEA900B58A93 /* OFThreadJoinFailedException.h in Headers */,
				4B55A101133ABEA900B58A93 /* OFThreadStartFailedException.h in Headers */,
				4B55A103133ABEA900B58A93 /* OFThreadStillRunningException.h in Headers */,
				4B17FFB5133A375B003E6DCD /* OFUnboundNamespaceException.h in Headers */,
				4BD77FDE176E4BC40031C497 /* OFUnboundPrefixException.h in Headers */,
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
				4B2C21961DA292BE00735907 /* unicode.m in Sources */,
				4B2C21981DA292BE00735907 /* OFAcceptFailedException.m in Sources */,
				4B2C219A1DA292BE00735907 /* OFAddressTranslationFailedException.m in Sources */,
				4B2C219B1DA292BE00735907 /* OFAllocFailedException.m in Sources */,
				4B2C219C1DA292BE00735907 /* OFAlreadyConnectedException.m in Sources */,
				4B2C219D1DA292BE00735907 /* OFBindFailedException.m in Sources */,
				4B2C219E1DA292BE00735907 /* OFChangeCurrentDirectoryPathFailedException.m in Sources */,
				4B2C219F1DA292BE00735907 /* OFChangeOwnerFailedException.m in Sources */,
				4B2C21A01DA292BE00735907 /* OFChangePermissionsFailedException.m in Sources */,
				4B2C21A11DA292BE00735907 /* OFChecksumFailedException.m in Sources */,
				4B2C21A21DA292BE00735907 /* OFConditionBroadcastFailedException.m in Sources */,
				4B2C21A31DA292BE00735907 /* OFConditionSignalFailedException.m in Sources */,
				4B2C21A41DA292BE00735907 /* OFConditionStillWaitingException.m in Sources */,
				4B2C21A51DA292BE00735907 /* OFConditionWaitFailedException.m in Sources */,
				4B2C21A61DA292BE00735907 /* OFConnectionFailedException.m in Sources */,
				4B2C21A71DA292BE00735907 /* OFCopyItemFailedException.m in Sources */,







<
<







3518
3519
3520
3521
3522
3523
3524


3525
3526
3527
3528
3529
3530
3531
				4B2C21961DA292BE00735907 /* unicode.m in Sources */,
				4B2C21981DA292BE00735907 /* OFAcceptFailedException.m in Sources */,
				4B2C219A1DA292BE00735907 /* OFAddressTranslationFailedException.m in Sources */,
				4B2C219B1DA292BE00735907 /* OFAllocFailedException.m in Sources */,
				4B2C219C1DA292BE00735907 /* OFAlreadyConnectedException.m in Sources */,
				4B2C219D1DA292BE00735907 /* OFBindFailedException.m in Sources */,
				4B2C219E1DA292BE00735907 /* OFChangeCurrentDirectoryPathFailedException.m in Sources */,


				4B2C21A11DA292BE00735907 /* OFChecksumFailedException.m in Sources */,
				4B2C21A21DA292BE00735907 /* OFConditionBroadcastFailedException.m in Sources */,
				4B2C21A31DA292BE00735907 /* OFConditionSignalFailedException.m in Sources */,
				4B2C21A41DA292BE00735907 /* OFConditionStillWaitingException.m in Sources */,
				4B2C21A51DA292BE00735907 /* OFConditionWaitFailedException.m in Sources */,
				4B2C21A61DA292BE00735907 /* OFConnectionFailedException.m in Sources */,
				4B2C21A71DA292BE00735907 /* OFCopyItemFailedException.m in Sources */,
3565
3566
3567
3568
3569
3570
3571

3572
3573

3574
3575
3576
3577
3578
3579
3580
3581
3582
				4B2C21BD1DA292BE00735907 /* OFObserveFailedException.m in Sources */,
				4B2C21BE1DA292BE00735907 /* OFOpenItemFailedException.m in Sources */,
				4B2C21BF1DA292BE00735907 /* OFOutOfMemoryException.m in Sources */,
				4B2C21C01DA292BE00735907 /* OFOutOfRangeException.m in Sources */,
				4B2C21C11DA292BE00735907 /* OFReadFailedException.m in Sources */,
				4B2C21C21DA292BE00735907 /* OFReadOrWriteFailedException.m in Sources */,
				4B2C21C31DA292BE00735907 /* OFRemoveItemFailedException.m in Sources */,

				4B14EACA1E9A8292005E8BFD /* OFSandboxActivationFailedException.m in Sources */,
				4B2C21C41DA292BE00735907 /* OFSeekFailedException.m in Sources */,

				4B2C21C51DA292BE00735907 /* OFSetOptionFailedException.m in Sources */,
				4B2C21C61DA292BE00735907 /* OFStatItemFailedException.m in Sources */,
				4B2C21C71DA292BE00735907 /* OFStillLockedException.m in Sources */,
				4B2C21C81DA292BE00735907 /* OFThreadJoinFailedException.m in Sources */,
				4B2C21C91DA292BE00735907 /* OFThreadStartFailedException.m in Sources */,
				4B2C21CA1DA292BE00735907 /* OFThreadStillRunningException.m in Sources */,
				4B2C21CB1DA292BE00735907 /* OFTruncatedDataException.m in Sources */,
				4B2C21CC1DA292BE00735907 /* OFUnboundNamespaceException.m in Sources */,
				4B2C21CD1DA292BE00735907 /* OFUnboundPrefixException.m in Sources */,







>


>

<







3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564

3565
3566
3567
3568
3569
3570
3571
				4B2C21BD1DA292BE00735907 /* OFObserveFailedException.m in Sources */,
				4B2C21BE1DA292BE00735907 /* OFOpenItemFailedException.m in Sources */,
				4B2C21BF1DA292BE00735907 /* OFOutOfMemoryException.m in Sources */,
				4B2C21C01DA292BE00735907 /* OFOutOfRangeException.m in Sources */,
				4B2C21C11DA292BE00735907 /* OFReadFailedException.m in Sources */,
				4B2C21C21DA292BE00735907 /* OFReadOrWriteFailedException.m in Sources */,
				4B2C21C31DA292BE00735907 /* OFRemoveItemFailedException.m in Sources */,
				4BF277201FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.m in Sources */,
				4B14EACA1E9A8292005E8BFD /* OFSandboxActivationFailedException.m in Sources */,
				4B2C21C41DA292BE00735907 /* OFSeekFailedException.m in Sources */,
				4BF2771E1FB8C113009F8FCF /* OFSetItemAttributesFailedException.m in Sources */,
				4B2C21C51DA292BE00735907 /* OFSetOptionFailedException.m in Sources */,

				4B2C21C71DA292BE00735907 /* OFStillLockedException.m in Sources */,
				4B2C21C81DA292BE00735907 /* OFThreadJoinFailedException.m in Sources */,
				4B2C21C91DA292BE00735907 /* OFThreadStartFailedException.m in Sources */,
				4B2C21CA1DA292BE00735907 /* OFThreadStillRunningException.m in Sources */,
				4B2C21CB1DA292BE00735907 /* OFTruncatedDataException.m in Sources */,
				4B2C21CC1DA292BE00735907 /* OFUnboundNamespaceException.m in Sources */,
				4B2C21CD1DA292BE00735907 /* OFUnboundPrefixException.m in Sources */,
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
				4B3D23B91337FC0D00DD29B8 /* unicode.m in Sources */,
				4B90B79F133AD87D00BD33CB /* OFAcceptFailedException.m in Sources */,
				4B90B7A1133AD87D00BD33CB /* OFAddressTranslationFailedException.m in Sources */,
				4B17FF80133A2D17003E6DCD /* OFAllocFailedException.m in Sources */,
				4B90B78E133AD46700BD33CB /* OFAlreadyConnectedException.m in Sources */,
				4B90B7A3133AD87D00BD33CB /* OFBindFailedException.m in Sources */,
				4B067FBC177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m in Sources */,
				4B067FBE177BA6F900B8CFDA /* OFChangeOwnerFailedException.m in Sources */,
				4B067FC0177BA6F900B8CFDA /* OFChangePermissionsFailedException.m in Sources */,
				4BE52D2617B990DA005958D1 /* OFChecksumFailedException.m in Sources */,
				4B8B170D133A3C11007CD8B3 /* OFConditionBroadcastFailedException.m in Sources */,
				4B8B170E133A3C11007CD8B3 /* OFConditionSignalFailedException.m in Sources */,
				4B7FF3B5133CED6200000324 /* OFConditionStillWaitingException.m in Sources */,
				4B8B170F133A3C11007CD8B3 /* OFConditionWaitFailedException.m in Sources */,
				4B90B7A5133AD87D00BD33CB /* OFConnectionFailedException.m in Sources */,
				4B62ED1618566FCA0004E0E3 /* OFCopyItemFailedException.m in Sources */,







<
<







3731
3732
3733
3734
3735
3736
3737


3738
3739
3740
3741
3742
3743
3744
				4B3D23B91337FC0D00DD29B8 /* unicode.m in Sources */,
				4B90B79F133AD87D00BD33CB /* OFAcceptFailedException.m in Sources */,
				4B90B7A1133AD87D00BD33CB /* OFAddressTranslationFailedException.m in Sources */,
				4B17FF80133A2D17003E6DCD /* OFAllocFailedException.m in Sources */,
				4B90B78E133AD46700BD33CB /* OFAlreadyConnectedException.m in Sources */,
				4B90B7A3133AD87D00BD33CB /* OFBindFailedException.m in Sources */,
				4B067FBC177BA6F900B8CFDA /* OFChangeCurrentDirectoryPathFailedException.m in Sources */,


				4BE52D2617B990DA005958D1 /* OFChecksumFailedException.m in Sources */,
				4B8B170D133A3C11007CD8B3 /* OFConditionBroadcastFailedException.m in Sources */,
				4B8B170E133A3C11007CD8B3 /* OFConditionSignalFailedException.m in Sources */,
				4B7FF3B5133CED6200000324 /* OFConditionStillWaitingException.m in Sources */,
				4B8B170F133A3C11007CD8B3 /* OFConditionWaitFailedException.m in Sources */,
				4B90B7A5133AD87D00BD33CB /* OFConnectionFailedException.m in Sources */,
				4B62ED1618566FCA0004E0E3 /* OFCopyItemFailedException.m in Sources */,
3779
3780
3781
3782
3783
3784
3785

3786
3787

3788
3789
3790
3791
3792
3793
3794
3795
3796
				4B35C64F1ADAD30A003DB666 /* OFObserveFailedException.m in Sources */,
				4B55A10B133AC05100B58A93 /* OFOpenItemFailedException.m in Sources */,
				4B17FF84133A2DFB003E6DCD /* OFOutOfMemoryException.m in Sources */,
				4B17FF7C133A2C15003E6DCD /* OFOutOfRangeException.m in Sources */,
				4B55A113133AC24600B58A93 /* OFReadFailedException.m in Sources */,
				4B55A115133AC24600B58A93 /* OFReadOrWriteFailedException.m in Sources */,
				4BFF3715177E17C100192782 /* OFRemoveItemFailedException.m in Sources */,

				4B14EAC91E9A8292005E8BFD /* OFSandboxActivationFailedException.m in Sources */,
				4B29BC42133AC4E80004B236 /* OFSeekFailedException.m in Sources */,

				4B90B792133AD46700BD33CB /* OFSetOptionFailedException.m in Sources */,
				4B72F7DF1AD9311B00CE253C /* OFStatItemFailedException.m in Sources */,
				4B6743F4163C384A00EB1E59 /* OFStillLockedException.m in Sources */,
				4B55A100133ABEA900B58A93 /* OFThreadJoinFailedException.m in Sources */,
				4B55A102133ABEA900B58A93 /* OFThreadStartFailedException.m in Sources */,
				4B55A104133ABEA900B58A93 /* OFThreadStillRunningException.m in Sources */,
				4B17FFAA133A34E7003E6DCD /* OFTruncatedDataException.m in Sources */,
				4B17FFB6133A375B003E6DCD /* OFUnboundNamespaceException.m in Sources */,
				4BD77FDF176E4BC40031C497 /* OFUnboundPrefixException.m in Sources */,







>


>

<







3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777

3778
3779
3780
3781
3782
3783
3784
				4B35C64F1ADAD30A003DB666 /* OFObserveFailedException.m in Sources */,
				4B55A10B133AC05100B58A93 /* OFOpenItemFailedException.m in Sources */,
				4B17FF84133A2DFB003E6DCD /* OFOutOfMemoryException.m in Sources */,
				4B17FF7C133A2C15003E6DCD /* OFOutOfRangeException.m in Sources */,
				4B55A113133AC24600B58A93 /* OFReadFailedException.m in Sources */,
				4B55A115133AC24600B58A93 /* OFReadOrWriteFailedException.m in Sources */,
				4BFF3715177E17C100192782 /* OFRemoveItemFailedException.m in Sources */,
				4BF2771F1FB8C113009F8FCF /* OFRetrieveItemAttributesFailedException.m in Sources */,
				4B14EAC91E9A8292005E8BFD /* OFSandboxActivationFailedException.m in Sources */,
				4B29BC42133AC4E80004B236 /* OFSeekFailedException.m in Sources */,
				4BF2771D1FB8C113009F8FCF /* OFSetItemAttributesFailedException.m in Sources */,
				4B90B792133AD46700BD33CB /* OFSetOptionFailedException.m in Sources */,

				4B6743F4163C384A00EB1E59 /* OFStillLockedException.m in Sources */,
				4B55A100133ABEA900B58A93 /* OFThreadJoinFailedException.m in Sources */,
				4B55A102133ABEA900B58A93 /* OFThreadStartFailedException.m in Sources */,
				4B55A104133ABEA900B58A93 /* OFThreadStillRunningException.m in Sources */,
				4B17FFAA133A34E7003E6DCD /* OFTruncatedDataException.m in Sources */,
				4B17FFB6133A375B003E6DCD /* OFUnboundNamespaceException.m in Sources */,
				4BD77FDF176E4BC40031C497 /* OFUnboundPrefixException.m in Sources */,

Modified src/OFData.m from [78d0532385] to [995d1dfd33].

189
190
191
192
193
194
195
196
197
198
199
200
201
202

203
204
205
206
207
208
209
	return self;
}

#ifdef OF_HAVE_FILES
- (instancetype)initWithContentsOfFile: (OFString *)path
{
	@try {
		of_offset_t size = [[OFFileManager defaultManager]
		    sizeOfFileAtPath: path];
		char *buffer;

		if (sizeof(of_offset_t) > sizeof(size_t) &&
		    size > (of_offset_t)SIZE_MAX)
			@throw [OFOutOfRangeException exception];


		buffer = malloc((size_t)size);
		if (buffer == NULL)
			@throw [OFOutOfMemoryException
			    exceptionWithRequestedSize: (size_t)size];

		@try {







|
|


|
|

>







189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
	return self;
}

#ifdef OF_HAVE_FILES
- (instancetype)initWithContentsOfFile: (OFString *)path
{
	@try {
		uintmax_t size = [[[OFFileManager defaultManager]
		    attributesOfItemAtPath: path] fileSize];
		char *buffer;

# if UINTMAX_MAX > SIZE_MAX
		if (size > SIZE_MAX)
			@throw [OFOutOfRangeException exception];
# endif

		buffer = malloc((size_t)size);
		if (buffer == NULL)
			@throw [OFOutOfMemoryException
			    exceptionWithRequestedSize: (size_t)size];

		@try {

Modified src/OFFileManager.h from [2cebe69c86] to [bd94387c51].

11
12
13
14
15
16
17

18
19
20


21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
























































































































































































39
40
41
42
43
44
45
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"

#import "OFSeekableStream.h"

OF_ASSUME_NONNULL_BEGIN



#if defined(OF_HAVE_CHMOD) && !defined(OF_MORPHOS)
# define OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
#endif
#if defined(OF_HAVE_CHOWN) && !defined(OF_MORPHOS)
# define OF_FILE_MANAGER_SUPPORTS_OWNER
#endif
#if (defined(OF_HAVE_LINK) && !defined(OF_MORPHOS)) || defined(OF_WINDOWS)
# define OF_FILE_MANAGER_SUPPORTS_LINKS
#endif
#if (defined(OF_HAVE_SYMLINK) && !defined(OF_MORPHOS)) || defined(OF_WINDOWS)
# define OF_FILE_MANAGER_SUPPORTS_SYMLINKS
#endif

@class OFArray OF_GENERIC(ObjectType);
@class OFDate;
@class OFURL;

























































































































































































/*!
 * @class OFFileManager OFFileManager.h ObjFW/OFFileManager.h
 *
 * @brief A class which provides management for files, e.g. reading contents of
 *	  directories, deleting files, renaming files, etc.
 */
@interface OFFileManager: OFObject







>



>
>


















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFObject.h"
#import "OFDictionary.h"
#import "OFSeekableStream.h"

OF_ASSUME_NONNULL_BEGIN

/*! @file */

#if defined(OF_HAVE_CHMOD) && !defined(OF_MORPHOS)
# define OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
#endif
#if defined(OF_HAVE_CHOWN) && !defined(OF_MORPHOS)
# define OF_FILE_MANAGER_SUPPORTS_OWNER
#endif
#if (defined(OF_HAVE_LINK) && !defined(OF_MORPHOS)) || defined(OF_WINDOWS)
# define OF_FILE_MANAGER_SUPPORTS_LINKS
#endif
#if (defined(OF_HAVE_SYMLINK) && !defined(OF_MORPHOS)) || defined(OF_WINDOWS)
# define OF_FILE_MANAGER_SUPPORTS_SYMLINKS
#endif

@class OFArray OF_GENERIC(ObjectType);
@class OFDate;
@class OFURL;

/*!
 * @brief A key for a file attribute in the file attributes dictionary.
 *
 * Possible keys for file URLs are:
 *
 *  * @ref of_file_attribute_key_size
 *  * @ref of_file_attribute_key_type
 *  * @ref of_file_attribute_key_posix_permissions
 *  * @ref of_file_attribute_key_posix_uid
 *  * @ref of_file_attribute_key_posix_gid
 *  * @ref of_file_attribute_key_owner
 *  * @ref of_file_attribute_key_group
 *  * @ref of_file_attribute_key_last_access_date
 *  * @ref of_file_attribute_key_modification_date
 *  * @ref of_file_attribute_key_status_change_date
 *  * @ref of_file_attribute_key_symbolic_link_destination
 *
 * Other URL schemes might not have all keys and might have keys not listed.
 */
typedef OFConstantString *of_file_attribute_key_t;

/*!
 * @brief The type of a file.
 *
 * Possibles values for file URLs are:
 *
 *  * @ref of_file_type_regular
 *  * @ref of_file_type_directory
 *  * @ref of_file_type_symbolic_link
 *  * @ref of_file_type_fifo
 *  * @ref of_file_type_character_special
 *  * @ref of_file_type_block_special
 *  * @ref of_file_type_socket
 *
 * Other URL schemes might not have all types and might have types not listed.
 */
typedef OFConstantString *of_file_type_t;

/*!
 * @brief A dictionary mapping keys of type @ref of_file_attribute_key_type_t
 *	  to their attribute values.
 */
typedef OFDictionary OF_GENERIC(of_file_attribute_key_t, id)
    *of_file_attributes_t;

/*!
 * @brief A mutable dictionary mapping keys of type
 *	  @ref of_file_attribute_key_type_t to their attribute values.
 */
typedef OFMutableDictionary OF_GENERIC(of_file_attribute_key_t, id)
    *of_mutable_file_attributes_t;

#ifdef __cplusplus
extern "C" {
#endif
/*!
 * @brief The size of the file as an @ref OFNumber.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref fileSize.
 */
extern const of_file_attribute_key_t of_file_attribute_key_size;

/*!
 * @brief The type of the file.
 *
 * The corresponding value is of type @ref of_file_type_t.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref fileType.
 */
extern const of_file_attribute_key_t of_file_attribute_key_type;

/*!
 * @brief The POSIX permissions of the file as an @ref OFNumber.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref filePOSIXPermissions.
 */
extern const of_file_attribute_key_t of_file_attribute_key_posix_permissions;

/*!
 * @brief The POSIX UID of the file as an @ref OFNumber.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref filePOSIXUID.
 */
extern const of_file_attribute_key_t of_file_attribute_key_posix_uid;

/*!
 * @brief The POSIX GID of the file as an @ref OFNumber.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref filePOSIXGID.
 */
extern const of_file_attribute_key_t of_file_attribute_key_posix_gid;

/*!
 * @brief The owner of the file as an @ref OFString.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref fileOwner.
 */
extern const of_file_attribute_key_t of_file_attribute_key_owner;

/*!
 * @brief The group of the file as an @ref OFString.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref fileGroup.
 */
extern const of_file_attribute_key_t of_file_attribute_key_group;

/*!
 * @brief The last access date of the file as an @ref OFDate.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref fileLastAccessDate.
 */
extern const of_file_attribute_key_t of_file_attribute_key_last_access_date;

/*!
 * @brief The last modification date of the file as an @ref OFDate.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref fileModificationDate.
 */
extern const of_file_attribute_key_t of_file_attribute_key_modification_date;

/*!
 * @brief The last status change date of the file as an @ref OFDate.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref fileStatusChangeDate.
 */
extern const of_file_attribute_key_t of_file_attribute_key_status_change_date;

/*!
 * @brief The destination of a symbolic link as an @ref OFString.
 *
 * For convenience, a category on @ref OFDictionary is provided to access this
 * via @ref fileSymbolicLinkDestination.
 */
extern const of_file_attribute_key_t
    of_file_attribute_key_symbolic_link_destination;

/*!
 * @brief A regular file.
 */
extern const of_file_type_t of_file_type_regular;

/*!
 * @brief A directory.
 */
extern const of_file_type_t of_file_type_directory;

/*!
 * @brief A symbolic link.
 */
extern const of_file_type_t of_file_type_symbolic_link;

/*!
 * @brief A FIFO.
 */
extern const of_file_type_t of_file_type_fifo;

/*!
 * @brief A character special file.
 */
extern const of_file_type_t of_file_type_character_special;

/*!
 * @brief A block special file.
 */
extern const of_file_type_t of_file_type_block_special;

/*!
 * @brief A socket.
 */
extern const of_file_type_t of_file_type_socket;
#ifdef __cplusplus
}
#endif

/*!
 * @class OFFileManager OFFileManager.h ObjFW/OFFileManager.h
 *
 * @brief A class which provides management for files, e.g. reading contents of
 *	  directories, deleting files, renaming files, etc.
 */
@interface OFFileManager: OFObject
58
59
60
61
62
63
64








































65
66
67
68
69
70
71
@property (readonly, nonatomic) OFURL *currentDirectoryURL;

/*!
 * @brief Returns the default file manager.
 */
+ (OFFileManager *)defaultManager;









































/*!
 * @brief Checks whether a file exists at the specified path.
 *
 * @param path The path to check
 * @return A boolean whether there is a file at the specified path
 */
- (bool)fileExistsAtPath: (OFString *)path;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
@property (readonly, nonatomic) OFURL *currentDirectoryURL;

/*!
 * @brief Returns the default file manager.
 */
+ (OFFileManager *)defaultManager;

/*!
 * @brief Returns the attributes for the item at the specified path.
 *
 * @param path The path to return the attributes for
 * @return A dictionary of attributes for the specified path, with the keys of
 *	   type @ref of_file_attribute_key_t
 */
- (of_file_attributes_t)attributesOfItemAtPath: (OFString *)path;

/*!
 * @brief Returns the attributes for the item at the specified URL.
 *
 * @param URL The URL to return the attributes for
 * @return A dictionary of attributes for the specified URL, with the keys of
 *	   type @ref of_file_attribute_key_t
 */
- (of_file_attributes_t)attributesOfItemAtURL: (OFURL *)URL;

/*!
 * @brief Sets the attributes for the item at the specified path.
 *
 * All attributes not part of the dictionary are left unchanged.
 *
 * @param attributes The attributes to set for the specified path
 * @param path The path of the item to set the attributes for
 */
- (void)setAttributes: (of_file_attributes_t)attributes
	 ofItemAtPath: (OFString *)path;

/*!
 * @brief Sets the attributes for the item at the specified URL.
 *
 * All attributes not part of the dictionary are left unchanged.
 *
 * @param attributes The attributes to set for the specified URL
 * @param URL The URL of the item to set the attributes for
 */
- (void)setAttributes: (of_file_attributes_t)attributes
	  ofItemAtURL: (OFURL *)URL;

/*!
 * @brief Checks whether a file exists at the specified path.
 *
 * @param path The path to check
 * @return A boolean whether there is a file at the specified path
 */
- (bool)fileExistsAtPath: (OFString *)path;
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
 * @brief Checks whether a directory exists at the specified URL.
 *
 * @param URL The URL to check
 * @return A boolean whether there is a directory at the specified URL
 */
- (bool)directoryExistsAtURL: (OFURL *)URL;

#ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS
/*!
 * @brief Checks whether a symbolic link exists at the specified path.
 *
 * @param path The path to check
 * @return A boolean whether there is a symbolic link at the specified path
 */
- (bool)symbolicLinkExistsAtPath: (OFString *)path;

/*!
 * @brief Checks whether a symbolic link exists at the specified URL.
 *
 * @param URL The URL to check
 * @return A boolean whether there is a symbolic link at the specified URL
 */
- (bool)symbolicLinkExistsAtURL: (OFURL *)URL;
#endif

/*!
 * @brief Creates a directory at the specified path.
 *
 * @param path The path of the directory to create
 */
- (void)createDirectoryAtPath: (OFString *)path;








<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







317
318
319
320
321
322
323


















324
325
326
327
328
329
330
 * @brief Checks whether a directory exists at the specified URL.
 *
 * @param URL The URL to check
 * @return A boolean whether there is a directory at the specified URL
 */
- (bool)directoryExistsAtURL: (OFURL *)URL;



















/*!
 * @brief Creates a directory at the specified path.
 *
 * @param path The path of the directory to create
 */
- (void)createDirectoryAtPath: (OFString *)path;

175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
 * @brief Changes the current working directory.
 *
 * @param URL The new directory to change to
 */
- (void)changeCurrentDirectoryURL: (OFURL *)URL;

/*!
 * @brief Returns the size of the specified file.
 *
 * @param path The path to the file whose size should be returned
 *
 * @return The size of the specified file
 */
- (of_offset_t)sizeOfFileAtPath: (OFString *)path;

/*!
 * @brief Returns the size of the specified file.
 *
 * @param URL The URL to the file whose size should be returned
 *
 * @return The size of the specified file
 */
- (of_offset_t)sizeOfFileAtURL: (OFURL *)URL;

/*!
 * @brief Returns the last access time of the specified item.
 *
 * @param path The path to the item whose last access time should be returned
 *
 * @return The last access time of the specified item
 */
- (OFDate *)accessTimeOfItemAtPath: (OFString *)path;

/*!
 * @brief Returns the last access time of the specified item.
 *
 * @param URL The URL to the item whose last access time should be returned
 *
 * @return The last access time of the specified item
 */
- (OFDate *)accessTimeOfItemAtURL: (OFURL *)URL;

/*!
 * @brief Returns the last modification date of the specified item.
 *
 * @param path The path to the item whose last modification date should be
 *	       returned
 *
 * @return The last modification date of the specified item
 */
- (OFDate *)modificationDateOfItemAtPath: (OFString *)path;

/*!
 * @brief Returns the last modification date of the specified item.
 *
 * @param URL The URL to the item whose last modification date should be
 *	       returned
 *
 * @return The last modification date of the specified item
 */
- (OFDate *)modificationDateOfItemAtURL: (OFURL *)URL;

/*!
 * @brief Returns the last status change time of the specified item.
 *
 * @param path The path to the item whose last status change time should be
 *	       returned
 *
 * @return The last status change time of the specified item
 */
- (OFDate *)statusChangeTimeOfItemAtPath: (OFString *)path;

/*!
 * @brief Returns the last status change time of the specified item.
 *
 * @param URL The URL to the item whose last status change time should be
 *	      returned
 *
 * @return The last status change time of the specified item
 */
- (OFDate *)statusChangeTimeOfItemAtURL: (OFURL *)URL;

#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
/*!
 * @brief Returns the permissions of the specified item.
 *
 * This returns only the permissions, meaning read, write and execute for
 * owner, user and group, along with the sticky, setuid and setgid bit. In
 * other words, only bits that match the mask 07777.
 *
 * @param path The path to the item whose permissions should be returned
 *
 * @return The permissions of the specified item
 */
- (uint16_t)permissionsOfItemAtPath: (OFString *)path;

/*!
 * @brief Returns the permissions of the specified item.
 *
 * This returns only the permissions, meaning read, write and execute for
 * owner, user and group, along with the sticky, setuid and setgid bit. In
 * other words, only bits that match the mask 07777.
 *
 * @param URL The URL to the item whose permissions should be returned
 *
 * @return The permissions of the specified item
 */
- (uint16_t)permissionsOfItemAtURL: (OFURL *)URL;

/*!
 * @brief Changes the permissions of an item.
 *
 * This only changes the permissions, meaning read, write and execute for
 * owner, user and group. For security reasons, it ignores all other bits. In
 * other words, the permissions are masked with 0777.
 *
 * This method only changes the read-only flag on Windows.
 *
 * @param path The path to the item whose permissions should be changed
 * @param permissions The new permissions for the item
 */
- (void)changePermissionsOfItemAtPath: (OFString *)path
			  permissions: (uint16_t)permissions;

/*!
 * @brief Changes the permissions of an item.
 *
 * This only changes the permissions, meaning read, write and execute for
 * owner, user and group. For security reasons, it ignores all other bits. In
 * other words, the permissions are masked with 0777.
 *
 * This method only changes the read-only flag on Windows.
 *
 * @param URL The URL to the item whose permissions should be changed
 * @param permissions The new permissions for the item
 */
- (void)changePermissionsOfItemAtURL: (OFURL *)URL
			 permissions: (uint16_t)permissions;
#endif

#ifdef OF_FILE_MANAGER_SUPPORTS_OWNER
/*!
 * @brief Get the UID and GID of the specified item.
 *
 * @param UID A pointer to an uint16_t to store the UID, or NULL
 * @param GID A pointer to an uint16_t to store the GID, or NULL
 * @param path The path to the item whose UID and GID should be retrieved
 */
- (void)getUID: (nullable uint16_t *)UID
	   GID: (nullable uint16_t *)GID
  ofItemAtPath: (OFString *)path;

/*!
 * @brief Get the UID and GID of the specified item.
 *
 * @param UID A pointer to an uint16_t to store the UID, or NULL
 * @param GID A pointer to an uint16_t to store the GID, or NULL
 * @param URL The URL to the item whose UID and GID should be retrieved
 */
- (void)getUID: (nullable uint16_t *)UID
	   GID: (nullable uint16_t *)GID
   ofItemAtURL: (OFURL *)URL;

/*!
 * @brief Get the owner and group of the specified item.
 *
 * @param owner A pointer to an `OFString *` to store the owner, or NULL
 * @param group A pointer to an `OFString *` to store the group, or NULL
 * @param path The path to the item whose owner and group should be retrieved
 */
- (void)getOwner: (OFString *__autoreleasing _Nonnull *_Nullable)owner
	   group: (OFString *__autoreleasing _Nonnull *_Nullable)group
    ofItemAtPath: (OFString *)path;

/*!
 * @brief Get the owner and group of the specified item.
 *
 * @param owner A pointer to an `OFString *` to store the owner, or NULL
 * @param group A pointer to an `OFString *` to store the group, or NULL
 * @param URL The URL to the item whose owner and group should be retrieved
 */
- (void)getOwner: (OFString *__autoreleasing _Nonnull *_Nullable)owner
	   group: (OFString *__autoreleasing _Nonnull *_Nullable)group
     ofItemAtURL: (OFURL *)URL;

/*!
 * @brief Changes the owner of an item.
 *
 * This method is not available on some systems, most notably Windows.
 *
 * @param path The path to the item whose owner should be changed
 * @param owner The new owner for the item
 * @param group The new group for the item
 */
- (void)changeOwnerOfItemAtPath: (OFString *)path
			  owner: (OFString *)owner
			  group: (OFString *)group;

/*!
 * @brief Changes the owner of an item.
 *
 * This method is not available on some systems, most notably Windows.
 *
 * @param URL The URL to the item whose owner should be changed
 * @param owner The new owner for the item
 * @param group The new group for the item
 */
- (void)changeOwnerOfItemAtURL: (OFURL *)URL
			 owner: (OFString *)owner
			 group: (OFString *)group;
#endif

/*!
 * @brief Copies a file, directory or symlink (if supported by the OS).
 *
 * The destination path must be a full path, which means it must include the
 * name of the item.
 *
 * If an item already exists, the copy operation fails. This is also the case
 * if a directory is copied and an item already exists in the destination
 * directory.
 *
 * @param source The file, directory or symlink to copy
 * @param destination The destination path
 */
- (void)copyItemAtPath: (OFString *)source
		toPath: (OFString *)destination;

/*!
 * @brief Copies a file, directory or symlink (if supported by the OS).
 *
 * The destination URL must have a full path, which means it must include the
 * name of the item.
 *
 * If an item already exists, the copy operation fails. This is also the case
 * if a directory is copied and an item already exists in the destination
 * directory.
 *
 * @param source The file, directory or symlink to copy
 * @param destination The destination URL
 */
- (void)copyItemAtURL: (OFURL *)source
		toURL: (OFURL *)destination;

/*!
 * @brief Moves an item.







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|








|






|








|







384
385
386
387
388
389
390














































































































































































































391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
 * @brief Changes the current working directory.
 *
 * @param URL The new directory to change to
 */
- (void)changeCurrentDirectoryURL: (OFURL *)URL;

/*!














































































































































































































 * @brief Copies a file, directory or symbolic link (if supported by the OS).
 *
 * The destination path must be a full path, which means it must include the
 * name of the item.
 *
 * If an item already exists, the copy operation fails. This is also the case
 * if a directory is copied and an item already exists in the destination
 * directory.
 *
 * @param source The file, directory or symbolic link to copy
 * @param destination The destination path
 */
- (void)copyItemAtPath: (OFString *)source
		toPath: (OFString *)destination;

/*!
 * @brief Copies a file, directory or symbolic link (if supported by the OS).
 *
 * The destination URL must have a full path, which means it must include the
 * name of the item.
 *
 * If an item already exists, the copy operation fails. This is also the case
 * if a directory is copied and an item already exists in the destination
 * directory.
 *
 * @param source The file, directory or symbolic link to copy
 * @param destination The destination URL
 */
- (void)copyItemAtURL: (OFURL *)source
		toURL: (OFURL *)destination;

/*!
 * @brief Moves an item.
530
531
532
533
534
535
536


537

538





539


540



541


542



543


544



545




546

547


548




549
550

551



552


553



554


555



556




557

558


559




560
561
562
 * @param destination The URL to the item which should symbolically link to the
 *		      source
 * @param source The URL to the item for which a symbolic link should be
 *		 created
 */
- (void)createSymbolicLinkAtURL: (OFURL *)destination
	     withDestinationURL: (OFURL *)source;




/*!





 * @brief Returns the destination of the symbolic link at the specified path.


 *



 * @param path The path to the symbolic link


 *



 * @note On Windows, at least Windows Vista is required.


 *



 * @return The destination of the symbolic link at the specified path




 */

- (OFString *)destinationOfSymbolicLinkAtPath: (OFString *)path;







/*!
 * @brief Returns the destination of the symbolic link at the specified URL.

 *



 * @param URL The URL to the symbolic link


 *



 * @note On Windows, at least Windows Vista is required.


 *



 * @return The destination of the symbolic link at the specified URL




 */

- (OFString *)destinationOfSymbolicLinkAtURL: (OFURL *)URL;


#endif




@end

OF_ASSUME_NONNULL_END







>
>

>

>
>
>
>
>
|
>
>

>
>
>
|
>
>

>
>
>
|
>
>

>
>
>
|
>
>
>
>

>
|
>
>
|
>
>
>
>

<
>

>
>
>
|
>
>

>
>
>
|
>
>

>
>
>
|
>
>
>
>

>
|
>
>
|
>
>
>
>



533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586

587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
 * @param destination The URL to the item which should symbolically link to the
 *		      source
 * @param source The URL to the item for which a symbolic link should be
 *		 created
 */
- (void)createSymbolicLinkAtURL: (OFURL *)destination
	     withDestinationURL: (OFURL *)source;
#endif
@end

@interface OFDictionary (FileAttributes)
/*!
 * The @ref of_file_attribute_key_size key from the dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) uintmax_t fileSize;

/*!
 * The @ref of_file_attribute_key_type key from the dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) of_file_type_t fileType;

/*!
 * The @ref of_file_attribute_key_posix_permissions key from the dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) uint16_t filePOSIXPermissions;

/*!
 * The @ref of_file_attribute_key_posix_uid key from the dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) uint32_t filePOSIXUID;

/*!
 * The @ref of_file_attribute_key_posix_gid key from the dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) uint32_t filePOSIXGID;

/*!
 * The @ref of_file_attribute_key_owner key from the dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) OFString *fileOwner;

/*!

 * The @ref of_file_attribute_key_group key from the dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) OFString *fileGroup;

/*!
 * The @ref of_file_attribute_key_last_access_date key from the dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) OFDate *fileLastAccessDate;

/*!
 * The @ref of_file_attribute_key_modification_date key from the dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) OFDate *fileModificationDate;

/*!
 * The @ref of_file_attribute_key_status_change_date key from the dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) OFDate *fileStatusChangeDate;

/*!
 * The @ref of_file_attribute_key_symbolic_link_destination key from the
 * dictionary.
 *
 * Raises an @ref OFUndefinedKeyException if the key is missing.
 */
@property (readonly, nonatomic) OFString *fileSymbolicLinkDestination;
@end

OF_ASSUME_NONNULL_END

Modified src/OFFileManager.m from [8a6c87da20] to [4d18813037].

30
31
32
33
34
35
36
37
38
39
40

41

42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66

67

68
69
70
71
72
73
74
#ifdef HAVE_PWD_H
# include <pwd.h>
#endif
#ifdef HAVE_GRP_H
# include <grp.h>
#endif

#import "OFFileManager.h"
#import "OFArray.h"
#import "OFDate.h"
#import "OFFile.h"

#import "OFLocalization.h"

#import "OFString.h"
#import "OFSystemInfo.h"
#import "OFURL.h"

#ifdef OF_HAVE_THREADS
# import "OFMutex.h"
#endif

#import "OFChangeCurrentDirectoryPathFailedException.h"
#import "OFChangeOwnerFailedException.h"
#import "OFChangePermissionsFailedException.h"
#import "OFCopyItemFailedException.h"
#import "OFCreateDirectoryFailedException.h"
#import "OFCreateSymbolicLinkFailedException.h"
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFLinkFailedException.h"
#import "OFLockFailedException.h"
#import "OFMoveItemFailedException.h"
#import "OFNotImplementedException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFRemoveItemFailedException.h"

#import "OFStatItemFailedException.h"

#import "OFUnlockFailedException.h"

#ifdef OF_WINDOWS
# include <windows.h>
# include <direct.h>
# include <ntdef.h>
#endif







|
|
|

>

>









<
<














>
|
>







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52


53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifdef HAVE_PWD_H
# include <pwd.h>
#endif
#ifdef HAVE_GRP_H
# include <grp.h>
#endif

#import "OFArray.h"
#import "OFDate.h"
#import "OFDictionary.h"
#import "OFFile.h"
#import "OFFileManager.h"
#import "OFLocalization.h"
#import "OFNumber.h"
#import "OFString.h"
#import "OFSystemInfo.h"
#import "OFURL.h"

#ifdef OF_HAVE_THREADS
# import "OFMutex.h"
#endif

#import "OFChangeCurrentDirectoryPathFailedException.h"


#import "OFCopyItemFailedException.h"
#import "OFCreateDirectoryFailedException.h"
#import "OFCreateSymbolicLinkFailedException.h"
#import "OFInitializationFailedException.h"
#import "OFInvalidArgumentException.h"
#import "OFLinkFailedException.h"
#import "OFLockFailedException.h"
#import "OFMoveItemFailedException.h"
#import "OFNotImplementedException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFRemoveItemFailedException.h"
#import "OFRetrieveItemAttributesFailedException.h"
#import "OFSetItemAttributesFailedException.h"
#import "OFUndefinedKeyException.h"
#import "OFUnlockFailedException.h"

#ifdef OF_WINDOWS
# include <windows.h>
# include <direct.h>
# include <ntdef.h>
#endif
99
100
101
102
103
104
105
































106
107
108
109
110
111
112
#endif

@interface OFFileManager_default: OFFileManager
@end

static OFFileManager *defaultManager;

































#if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) && !defined(OF_MORPHOS)
static OFMutex *passwdMutex;
#endif
#if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) && !defined(OF_WINDOWS)
static OFMutex *readdirMutex;
#endif








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#endif

@interface OFFileManager_default: OFFileManager
@end

static OFFileManager *defaultManager;

const of_file_attribute_key_t of_file_attribute_key_size =
    @"of_file_attribute_key_size";
const of_file_attribute_key_t of_file_attribute_key_type =
    @"of_file_attribute_key_type";
const of_file_attribute_key_t of_file_attribute_key_posix_permissions =
    @"of_file_attribute_key_posix_permissions";
const of_file_attribute_key_t of_file_attribute_key_posix_uid =
    @"of_file_attribute_key_posix_uid";
const of_file_attribute_key_t of_file_attribute_key_posix_gid =
    @"of_file_attribute_key_posix_gid";
const of_file_attribute_key_t of_file_attribute_key_owner =
    @"of_file_attribute_key_owner";
const of_file_attribute_key_t of_file_attribute_key_group =
    @"of_file_attribute_key_group";
const of_file_attribute_key_t of_file_attribute_key_last_access_date =
    @"of_file_attribute_key_last_access_date";
const of_file_attribute_key_t of_file_attribute_key_modification_date =
    @"of_file_attribute_key_modification_date";
const of_file_attribute_key_t of_file_attribute_key_status_change_date =
    @"of_file_attribute_key_status_change_date";
const of_file_attribute_key_t of_file_attribute_key_symbolic_link_destination =
    @"of_file_attribute_key_symbolic_link_destination";

const of_file_type_t of_file_type_regular = @"of_file_type_regular";
const of_file_type_t of_file_type_directory = @"of_file_type_directory";
const of_file_type_t of_file_type_symbolic_link = @"of_file_type_symbolic_link";
const of_file_type_t of_file_type_fifo = @"of_file_type_fifo";
const of_file_type_t of_file_type_character_special =
    @"of_file_type_character_special";
const of_file_type_t of_file_type_block_special = @"of_file_type_block_special";
const of_file_type_t of_file_type_socket = @"of_file_type_socket";

#if defined(OF_HAVE_CHOWN) && defined(OF_HAVE_THREADS) && !defined(OF_MORPHOS)
static OFMutex *passwdMutex;
#endif
#if !defined(HAVE_READDIR_R) && defined(OF_HAVE_THREADS) && !defined(OF_WINDOWS)
static OFMutex *readdirMutex;
#endif

205
206
207
208
209
210
211






































































































































































































212
213
214
215
216
217
218
	return lstat([path cStringWithEncoding: [OFLocalization encoding]],
	    buffer);
# endif
#else
	return of_stat(path, buffer);
#endif
}







































































































































































































@implementation OFFileManager
+ (void)initialize
{
#ifdef OF_WINDOWS
	HMODULE module;
#endif







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
	return lstat([path cStringWithEncoding: [OFLocalization encoding]],
	    buffer);
# endif
#else
	return of_stat(path, buffer);
#endif
}

static void
setTypeAttribute(of_mutable_file_attributes_t attributes, of_stat_t *s)
{
	if (S_ISREG(s->st_mode))
		[attributes setObject: of_file_type_regular
			       forKey: of_file_attribute_key_type];
	else if (S_ISDIR(s->st_mode))
		[attributes setObject: of_file_type_directory
			       forKey: of_file_attribute_key_type];
#ifdef S_ISLNK
	else if (S_ISLNK(s->st_mode))
		[attributes setObject: of_file_type_symbolic_link
			       forKey: of_file_attribute_key_type];
#endif
#ifdef S_ISFIFO
	else if (S_ISFIFO(s->st_mode))
		[attributes setObject: of_file_type_fifo
			       forKey: of_file_attribute_key_type];
#endif
#ifdef S_ISCHR
	else if (S_ISCHR(s->st_mode))
		[attributes setObject: of_file_type_character_special
			       forKey: of_file_attribute_key_type];
#endif
#ifdef S_ISBLK
	else if (S_ISBLK(s->st_mode))
		[attributes setObject: of_file_type_block_special
			       forKey: of_file_attribute_key_type];
#endif
#ifdef S_ISSOCK
	else if (S_ISSOCK(s->st_mode))
		[attributes setObject: of_file_type_socket
			       forKey: of_file_attribute_key_type];
#endif
}

static void
setDateAttributes(of_mutable_file_attributes_t attributes, of_stat_t *s)
{
	/* FIXME: We could be more precise on some OSes */
	[attributes
	    setObject: [OFDate dateWithTimeIntervalSince1970: s->st_atime]
	       forKey: of_file_attribute_key_last_access_date];
	[attributes
	    setObject: [OFDate dateWithTimeIntervalSince1970: s->st_mtime]
	       forKey: of_file_attribute_key_modification_date];
	[attributes
	    setObject: [OFDate dateWithTimeIntervalSince1970: s->st_ctime]
	       forKey: of_file_attribute_key_status_change_date];
}

static void
setOwnerAndGroupAttributes(of_mutable_file_attributes_t attributes,
    of_stat_t *s)
{
#ifdef OF_FILE_MANAGER_SUPPORTS_OWNER
	[attributes setObject: [NSNumber numberWithUInt16: s->st_uid]
		       forKey: of_file_attribute_key_posix_uid];
	[attributes setObject: [NSNumber numberWithUInt16: s->st_gid]
		       forKey: of_file_attribute_key_posix_gid];

# ifdef OF_HAVE_THREADS
	[passwdMutex lock];
	@try {
# endif
		of_string_encoding_t encoding = [OFLocalization encoding];
		struct passwd *passwd = getpwuid(s->st_uid);
		struct group *group_ = getgrgid(s->st_gid);

		if (passwd != NULL) {
			OFString *owner = [OFString
			    stringWithCString: passwd->pw_name
				     encoding: encoding];

			[attributes setObject: owner
				       forKey: of_file_attribute_key_owner];
		}

		if (group_ != NULL) {
			OFString *group = [OFString
			    stringWithCString: group_->gr_name
				     encoding: encoding];

			[attributes setObject: group
				       forKey: of_file_attribute_key_group];
		}
# ifdef OF_HAVE_THREADS
	} @finally {
		[passwdMutex unlock];
	}
# endif
#endif
}

static void
setSymbolicLinkDestinationAttribute(of_mutable_file_attributes_t attributes,
    of_stat_t *s, OFString *path)
{
#ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS
# ifndef OF_WINDOWS
	if (S_ISLNK(s->st_mode)) {
		of_string_encoding_t encoding = [OFLocalization encoding];
		char destinationC[PATH_MAX];
		ssize_t length;
		OFString *destination;
		of_file_attribute_key_t key;

		length = readlink([path cStringWithEncoding: encoding],
		    destinationC, PATH_MAX);

		if (length < 0)
			@throw [OFRetrieveItemAttributesFailedException
			    exceptionWithPath: path
					errNo: errno];

		destination = [OFString stringWithCString: destinationC
						 encoding: encoding
						   length: length];

		key = of_file_attribute_key_symbolic_link_destination;
		[attributes setObject: destination
			       forKey: key];
	}
# else
	WIN32_FIND_DATAW data;

	if (func_CreateSymbolicLinkW != NULL &&
	    FindFirstFileW([path UTF16String], &data) &&
	    (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) &&
	    data.dwReserved0 == IO_REPARSE_TAG_SYMLINK) {
		HANDLE handle;
		OFString *destination;

		if ((handle = CreateFileW([path UTF16String], 0,
		    (FILE_SHARE_READ | FILE_SHARE_WRITE), NULL, OPEN_EXISTING,
		    FILE_FLAG_OPEN_REPARSE_POINT, NULL)) ==
		    INVALID_HANDLE_VALUE)
			@throw [OFRetrieveItemAttributesFailedException
			    exceptionWithPath: path
					errNo: 0];

		@try {
			union {
				char bytes[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
				REPARSE_DATA_BUFFER data;
			} buffer;
			DWORD size;
			wchar_t *tmp;
			of_file_attribute_key_t key;

			if (!DeviceIoControl(handle, FSCTL_GET_REPARSE_POINT,
			    NULL, 0, buffer.bytes,
			    MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &size, NULL))
				@throw [OFRetrieveItemAttributesFailedException
				    exceptionWithPath: path
						errNo: 0];

			if (buffer.data.ReparseTag != IO_REPARSE_TAG_SYMLINK)
				@throw [OFRetrieveItemAttributesFailedException
				    exceptionWithPath: path
						errNo: 0];

#  define slrb buffer.data.SymbolicLinkReparseBuffer
			tmp = slrb.PathBuffer +
			    (slrb.SubstituteNameOffset / sizeof(wchar_t));

			destination = [OFString
			    stringWithUTF16String: tmp
					   length: slrb.SubstituteNameLength /
						   sizeof(wchar_t)];

			[attributes setObject: of_file_type_symbolic_link
				       forKey: of_file_attribute_key_type];
			key = of_file_attribute_key_symbolic_link_destination;
			[attributes setObject: destination
				       forKey: key];
#  undef slrb
		} @finally {
			CloseHandle(handle);
		}
	}
# endif
#endif
}

static id
attributeForKeyOrException(of_file_attributes_t attributes,
    of_file_attribute_key_t key)
{
	id object = [attributes objectForKey: key];

	if (object == nil)
		@throw [OFUndefinedKeyException exceptionWithObject: attributes
								key: key];

	return object;
}

@implementation OFFileManager
+ (void)initialize
{
#ifdef OF_WINDOWS
	HMODULE module;
#endif
313
314
315
316
317
318
319




























































































































































































320
321
322
323
324
325
326

	[URL makeImmutable];

	objc_autoreleasePoolPop(pool);

	return URL;
}





























































































































































































- (bool)fileExistsAtPath: (OFString *)path
{
	of_stat_t s;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746

	[URL makeImmutable];

	objc_autoreleasePoolPop(pool);

	return URL;
}

- (of_file_attributes_t)attributesOfItemAtPath: (OFString *)path
{
	of_mutable_file_attributes_t ret = [OFMutableDictionary dictionary];
	void *pool = objc_autoreleasePoolPush();
	of_stat_t s;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];

	if (of_lstat(path, &s) == -1)
		@throw [OFRetrieveItemAttributesFailedException
		    exceptionWithPath: path
				errNo: errno];

	if (s.st_size < 0)
		@throw [OFOutOfRangeException exception];

	[ret setObject: [NSNumber numberWithUIntMax: s.st_size]
		forKey: of_file_attribute_key_size];

	setTypeAttribute(ret, &s);

	[ret setObject: [NSNumber numberWithUInt16: s.st_mode & 07777]
		forKey: of_file_attribute_key_posix_permissions];

	setOwnerAndGroupAttributes(ret, &s);
	setDateAttributes(ret, &s);
	setSymbolicLinkDestinationAttribute(ret, &s, path);

	objc_autoreleasePoolPop(pool);

	return ret;
}

- (of_file_attributes_t)attributesOfItemAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();
	of_file_attributes_t ret = [self attributesOfItemAtPath:
	    [URL fileSystemRepresentation]];

	[ret retain];

	objc_autoreleasePoolPop(pool);

	return [ret autorelease];
}

- (void)of_setPOSIXPermissions: (OFNumber *)permissions
		  ofItemAtPath: (OFString *)path
		    attributes: (of_file_attributes_t)attributes
{
#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
	uint16_t mode = [permissions uInt16Value] & 0777;

# ifndef OF_WINDOWS
	if (chmod([path cStringWithEncoding: [OFLocalization encoding]],
	    mode) != 0)
# else
	if (_wchmod([path UTF16String], mode) != 0)
# endif
		@throw [OFSetItemAttributesFailedException
		    exceptionWithPath: path
			   attributes: attributes
		      failedAttribute: of_file_attribute_key_posix_permissions
				errNo: errno];
#else
	@throw [OFNotImplementedException exceptionWithSelector: _cmd
							 object: self];
#endif
}

- (void)of_setOwner: (OFString *)owner
	   andGroup: (OFString *)group
       ofItemAtPath: (OFString *)path
       attributeKey: (of_file_attribute_key_t)attributeKey
	 attributes: (of_file_attributes_t)attributes
{
#ifdef OF_FILE_MANAGER_SUPPORTS_OWNER
	uid_t uid = -1;
	gid_t gid = -1;
	of_string_encoding_t encoding;

	if (owner == nil && group == nil)
		@throw [OFInvalidArgumentException exception];

	encoding = [OFLocalization encoding];

# ifdef OF_HAVE_THREADS
	[passwdMutex lock];
	@try {
# endif
		if (owner != nil) {
			struct passwd *passwd;

			if ((passwd = getpwnam([owner
			    cStringWithEncoding: encoding])) == NULL)
				@throw [OFSetItemAttributesFailedException
				    exceptionWithPath: path
					   attributes: attributes
				      failedAttribute: attributeKey
						errNo: errno];

			uid = passwd->pw_uid;
		}

		if (group != nil) {
			struct group *group_;

			if ((group_ = getgrnam([group
			    cStringWithEncoding: encoding])) == NULL)
				@throw [OFSetItemAttributesFailedException
				    exceptionWithPath: path
					   attributes: attributes
				      failedAttribute: attributeKey
						errNo: errno];

			gid = group_->gr_gid;
		}
# ifdef OF_HAVE_THREADS
	} @finally {
		[passwdMutex unlock];
	}
# endif

	if (chown([path cStringWithEncoding: encoding], uid, gid) != 0)
		@throw [OFSetItemAttributesFailedException
		    exceptionWithPath: path
			   attributes: attributes
		      failedAttribute: attributeKey
				errNo: errno];
#else
	@throw [OFNotImplementedException exceptionWithSelector: _cmd
							 object: self];
#endif
}

- (void)setAttributes: (of_file_attributes_t)attributes
	 ofItemAtPath: (OFString *)path
{
	void *pool;
	OFEnumerator OF_GENERIC(of_file_attribute_key_t) *keyEnumerator;
	OFEnumerator *objectEnumerator;
	of_file_attribute_key_t key;
	id object;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];

	pool = objc_autoreleasePoolPush();
	keyEnumerator = [attributes keyEnumerator];
	objectEnumerator = [attributes objectEnumerator];

	while ((key = [keyEnumerator nextObject]) != nil &&
	    (object = [objectEnumerator nextObject]) != nil) {
		if ([key isEqual: of_file_attribute_key_posix_permissions])
			[self of_setPOSIXPermissions: object
					ofItemAtPath: path
					  attributes: attributes];
		else if ([key isEqual: of_file_attribute_key_owner])
			[self of_setOwner: object
				 andGroup: nil
			     ofItemAtPath: path
			     attributeKey: key
			       attributes: attributes];
		else if ([key isEqual: of_file_attribute_key_group])
			[self of_setOwner: nil
				 andGroup: object
			     ofItemAtPath: path
			     attributeKey: key
			       attributes: attributes];
		else
			@throw [OFInvalidArgumentException exception];
	}

	objc_autoreleasePoolPop(pool);
}

- (void)setAttributes: (of_file_attributes_t)attributes
	  ofItemAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();

	[self setAttributes: attributes
	       ofItemAtPath: [URL fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);
}

- (bool)fileExistsAtPath: (OFString *)path
{
	of_stat_t s;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
	bool ret = [self directoryExistsAtPath: [URL fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);

	return ret;
}

#ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS
- (bool)symbolicLinkExistsAtPath: (OFString *)path
{
# ifndef OF_WINDOWS
	of_stat_t s;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];

	if (of_lstat(path, &s) == -1)
		return false;

	return S_ISLNK(s.st_mode);
# else
	WIN32_FIND_DATAW data;

	if (!FindFirstFileW([path UTF16String], &data))
		return false;

	if ((data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) &&
	    data.dwReserved0 == IO_REPARSE_TAG_SYMLINK)
		return true;

	return false;
# endif
}

- (bool)symbolicLinkExistsAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();
	bool ret = [self symbolicLinkExistsAtPath:
	    [URL fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);

	return ret;
}
#endif

- (void)createDirectoryAtPath: (OFString *)path
{
	if (path == nil)
		@throw [OFInvalidArgumentException exception];

#if defined(OF_WINDOWS)
	if (_wmkdir([path UTF16String]) != 0)







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







780
781
782
783
784
785
786







































787
788
789
790
791
792
793
	bool ret = [self directoryExistsAtPath: [URL fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);

	return ret;
}








































- (void)createDirectoryAtPath: (OFString *)path
{
	if (path == nil)
		@throw [OFInvalidArgumentException exception];

#if defined(OF_WINDOWS)
	if (_wmkdir([path UTF16String]) != 0)
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099

1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112

1113

1114
1115
1116
1117
1118
1119



1120
1121
1122
1123

1124








1125
1126
1127
1128
1129
1130
1131
1132
1133
	void *pool = objc_autoreleasePoolPush();

	[self changeCurrentDirectoryPath: [URL fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);
}

- (of_offset_t)sizeOfFileAtPath: (OFString *)path
{
	of_stat_t s;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];

	if (of_stat(path, &s) != 0)
		@throw [OFStatItemFailedException exceptionWithPath: path
							      errNo: errno];

	return s.st_size;
}

- (of_offset_t)sizeOfFileAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();
	of_offset_t ret = [self sizeOfFileAtPath:
	    [URL fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);

	return ret;
}

- (OFDate *)accessTimeOfItemAtPath: (OFString *)path
{
	of_stat_t s;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];

	if (of_stat(path, &s) != 0)
		@throw [OFStatItemFailedException exceptionWithPath: path
							      errNo: errno];

	/* FIXME: We could be more precise on some OSes */
	return [OFDate dateWithTimeIntervalSince1970: s.st_atime];
}

- (OFDate *)accessTimeOfItemAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *ret = [self accessTimeOfItemAtPath:
	    [URL fileSystemRepresentation]];

	[ret retain];

	objc_autoreleasePoolPop(pool);

	return [ret autorelease];
}

- (OFDate *)modificationDateOfItemAtPath: (OFString *)path
{
	of_stat_t s;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];

	if (of_stat(path, &s) != 0)
		@throw [OFStatItemFailedException exceptionWithPath: path
							      errNo: errno];

	/* FIXME: We could be more precise on some OSes */
	return [OFDate dateWithTimeIntervalSince1970: s.st_mtime];
}

- (OFDate *)modificationDateOfItemAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *ret = [self modificationDateOfItemAtPath:
	    [URL fileSystemRepresentation]];

	[ret retain];

	objc_autoreleasePoolPop(pool);

	return [ret autorelease];
}

- (OFDate *)statusChangeTimeOfItemAtPath: (OFString *)path
{
	of_stat_t s;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];

	if (of_stat(path, &s) != 0)
		@throw [OFStatItemFailedException exceptionWithPath: path
							      errNo: errno];

	/* FIXME: We could be more precise on some OSes */
	return [OFDate dateWithTimeIntervalSince1970: s.st_ctime];
}

- (OFDate *)statusChangeTimeOfItemAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();
	OFDate *ret = [self statusChangeTimeOfItemAtPath:
	    [URL fileSystemRepresentation]];

	[ret retain];

	objc_autoreleasePoolPop(pool);

	return [ret autorelease];
}

#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
- (uint16_t)permissionsOfItemAtPath: (OFString *)path
{
	of_stat_t s;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];

	if (of_stat(path, &s) != 0)
		@throw [OFStatItemFailedException exceptionWithPath: path
							      errNo: errno];

	return s.st_mode & 07777;
}

- (uint16_t)permissionsOfItemAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();
	uint16_t ret = [self permissionsOfItemAtPath:
	    [URL fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);

	return ret;
}

- (void)changePermissionsOfItemAtPath: (OFString *)path
			  permissions: (uint16_t)permissions
{
	if (path == nil)
		@throw [OFInvalidArgumentException exception];

	permissions &= 0777;

# ifndef OF_WINDOWS
	if (chmod([path cStringWithEncoding: [OFLocalization encoding]],
	    permissions) != 0)
# else
	if (_wchmod([path UTF16String], permissions) != 0)
# endif
		@throw [OFChangePermissionsFailedException
		    exceptionWithPath: path
			  permissions: permissions
				errNo: errno];
}

- (void)changePermissionsOfItemAtURL: (OFURL *)URL
			 permissions: (uint16_t)permissions
{
	void *pool = objc_autoreleasePoolPush();

	[self changePermissionsOfItemAtPath: [URL fileSystemRepresentation]
				permissions: permissions];

	objc_autoreleasePoolPop(pool);
}
#endif

#ifdef OF_FILE_MANAGER_SUPPORTS_OWNER
- (void)getUID: (uint16_t *)UID
	   GID: (uint16_t *)GID
  ofItemAtPath: (OFString *)path
{
	of_stat_t s;

	if (path == nil)
		@throw [OFInvalidArgumentException exception];

	if (of_stat(path, &s) != 0)
		@throw [OFStatItemFailedException exceptionWithPath: path
							      errNo: errno];

	if (UID != NULL)
		*UID = s.st_uid;
	if (GID != NULL)
		*GID = s.st_gid;
}

- (void)getUID: (uint16_t *)UID
	   GID: (uint16_t *)GID
   ofItemAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();

	[self	  getUID: UID
		     GID: GID
	    ofItemAtPath: [URL fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);
}

- (void)getOwner: (OFString **)owner
	   group: (OFString **)group
    ofItemAtPath: (OFString *)path
{
	uint16_t UID, GID;

	[self	  getUID: &UID
		     GID: &GID
	    ofItemAtPath: path];

# ifdef OF_HAVE_THREADS
	[passwdMutex lock];
	@try {
# endif
		of_string_encoding_t encoding = [OFLocalization encoding];

		if (owner != NULL) {
			struct passwd *passwd = getpwuid(UID);

			*owner = [OFString stringWithCString: passwd->pw_name
						    encoding: encoding];
		}

		if (group != NULL) {
			struct group *group_ = getgrgid(GID);

			*group = [OFString stringWithCString: group_->gr_name
						    encoding: encoding];
		}
# ifdef OF_HAVE_THREADS
	} @finally {
		[passwdMutex unlock];
	}
# endif
}

- (void)getOwner: (OFString **)owner
	   group: (OFString **)group
     ofItemAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();
	OFString *path = [URL fileSystemRepresentation];

	[path retain];

	objc_autoreleasePoolPop(pool);

	@try {
		[self   getOwner: owner
			   group: group
		    ofItemAtPath: path];
	} @finally {
		[path release];
	}
}

- (void)changeOwnerOfItemAtPath: (OFString *)path
			  owner: (OFString *)owner
			  group: (OFString *)group
{
	uid_t uid = -1;
	gid_t gid = -1;
	of_string_encoding_t encoding;

	if (path == nil || (owner == nil && group == nil))
		@throw [OFInvalidArgumentException exception];

	encoding = [OFLocalization encoding];

# ifdef OF_HAVE_THREADS
	[passwdMutex lock];
	@try {
# endif
		if (owner != nil) {
			struct passwd *passwd;

			if ((passwd = getpwnam([owner
			    cStringWithEncoding: encoding])) == NULL)
				@throw [OFChangeOwnerFailedException
				    exceptionWithPath: path
						owner: owner
						group: group
						errNo: errno];

			uid = passwd->pw_uid;
		}

		if (group != nil) {
			struct group *group_;

			if ((group_ = getgrnam([group
			    cStringWithEncoding: encoding])) == NULL)
				@throw [OFChangeOwnerFailedException
				    exceptionWithPath: path
						owner: owner
						group: group
						errNo: errno];

			gid = group_->gr_gid;
		}
# ifdef OF_HAVE_THREADS
	} @finally {
		[passwdMutex unlock];
	}
# endif

	if (chown([path cStringWithEncoding: encoding], uid, gid) != 0)
		@throw [OFChangeOwnerFailedException exceptionWithPath: path
								 owner: owner
								 group: group
								 errNo: errno];
}

- (void)changeOwnerOfItemAtURL: (OFURL *)URL
			 owner: (OFString *)owner
			 group: (OFString *)group
{
	void *pool = objc_autoreleasePoolPush();

	[self changeOwnerOfItemAtPath: [URL fileSystemRepresentation]
				owner: owner
				group: group];

	objc_autoreleasePoolPop(pool);
}
#endif

- (void)copyItemAtPath: (OFString *)source
		toPath: (OFString *)destination
{
	void *pool;

	of_stat_t s;

	if (source == nil || destination == nil)
		@throw [OFInvalidArgumentException exception];

	pool = objc_autoreleasePoolPush();

	if (of_lstat(destination, &s) == 0)
		@throw [OFCopyItemFailedException
		    exceptionWithSourcePath: source
			    destinationPath: destination
				      errNo: EEXIST];


	if (of_lstat(source, &s) != 0)

		@throw [OFCopyItemFailedException
		    exceptionWithSourcePath: source
			    destinationPath: destination
				      errNo: errno];

	if (S_ISDIR(s.st_mode)) {



		OFArray *contents;

		@try {
			[self createDirectoryAtPath: destination];

#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS








			[self changePermissionsOfItemAtPath: destination
						permissions: s.st_mode];
#endif

			contents = [self contentsOfDirectoryAtPath: source];
		} @catch (id e) {
			/*
			 * Only convert exceptions to OFCopyItemFailedException
			 * that have an errNo property. This covers all I/O







<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




>
|






|





>
|
>



|
|
|
>
>
>




>

>
>
>
>
>
>
>
>
|
<







1143
1144
1145
1146
1147
1148
1149







































































































































































































































































































































1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194

1195
1196
1197
1198
1199
1200
1201
	void *pool = objc_autoreleasePoolPush();

	[self changeCurrentDirectoryPath: [URL fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);
}








































































































































































































































































































































- (void)copyItemAtPath: (OFString *)source
		toPath: (OFString *)destination
{
	void *pool;
	of_file_attributes_t attributes;
	of_file_type_t type;

	if (source == nil || destination == nil)
		@throw [OFInvalidArgumentException exception];

	pool = objc_autoreleasePoolPush();

	if ([self fileExistsAtPath: destination])
		@throw [OFCopyItemFailedException
		    exceptionWithSourcePath: source
			    destinationPath: destination
				      errNo: EEXIST];

	@try {
		attributes = [self attributesOfItemAtPath: source];
	} @catch (OFRetrieveItemAttributesFailedException *e) {
		@throw [OFCopyItemFailedException
		    exceptionWithSourcePath: source
			    destinationPath: destination
				      errNo: [e errNo]];
	}

	type = [attributes fileType];

	if ([type isEqual: of_file_type_directory]) {
		OFArray *contents;

		@try {
			[self createDirectoryAtPath: destination];

#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
			of_file_attribute_key_t key =
			    of_file_attribute_key_posix_permissions;
			OFNumber *permissions = [attributes objectForKey: key];
			of_file_attributes_t destinationAttributes =
			    [OFDictionary dictionaryWithObject: permissions
							forKey: key];

			[self setAttributes: destinationAttributes
			       ofItemAtPath: destination];

#endif

			contents = [self contentsOfDirectoryAtPath: source];
		} @catch (id e) {
			/*
			 * Only convert exceptions to OFCopyItemFailedException
			 * that have an errNo property. This covers all I/O
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
			    [destination stringByAppendingPathComponent: item];

			[self copyItemAtPath: sourcePath
				      toPath: destinationPath];

			objc_autoreleasePoolPop(pool2);
		}
	} else if (S_ISREG(s.st_mode)) {
		size_t pageSize = [OFSystemInfo pageSize];
		OFFile *sourceFile = nil;
		OFFile *destinationFile = nil;
		char *buffer;

		if ((buffer = malloc(pageSize)) == NULL)
			@throw [OFOutOfMemoryException







|







1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
			    [destination stringByAppendingPathComponent: item];

			[self copyItemAtPath: sourcePath
				      toPath: destinationPath];

			objc_autoreleasePoolPop(pool2);
		}
	} else if ([type isEqual: of_file_type_regular]) {
		size_t pageSize = [OFSystemInfo pageSize];
		OFFile *sourceFile = nil;
		OFFile *destinationFile = nil;
		char *buffer;

		if ((buffer = malloc(pageSize)) == NULL)
			@throw [OFOutOfMemoryException
1179
1180
1181
1182
1183
1184
1185








1186
1187
1188
1189
1190
1191
1192
1193
1194
				length = [sourceFile readIntoBuffer: buffer
							     length: pageSize];
				[destinationFile writeBuffer: buffer
						      length: length];
			}

#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS








			[self changePermissionsOfItemAtPath: destination
						permissions: s.st_mode];
#endif
		} @catch (id e) {
			/*
			 * Only convert exceptions to OFCopyItemFailedException
			 * that have an errNo property. This covers all I/O
			 * related exceptions from the operations used to copy
			 * an item, all others should be left as is.







>
>
>
>
>
>
>
>
|
<







1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262

1263
1264
1265
1266
1267
1268
1269
				length = [sourceFile readIntoBuffer: buffer
							     length: pageSize];
				[destinationFile writeBuffer: buffer
						      length: length];
			}

#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
			of_file_attribute_key_t key =
			    of_file_attribute_key_posix_permissions;
			OFNumber *permissions = [attributes objectForKey: key];
			of_file_attributes_t destinationAttributes =
			    [OFDictionary dictionaryWithObject: permissions
							forKey: key];

			[self setAttributes: destinationAttributes
			       ofItemAtPath: destination];

#endif
		} @catch (id e) {
			/*
			 * Only convert exceptions to OFCopyItemFailedException
			 * that have an errNo property. This covers all I/O
			 * related exceptions from the operations used to copy
			 * an item, all others should be left as is.
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
			@throw e;
		} @finally {
			[sourceFile close];
			[destinationFile close];
			free(buffer);
		}
#ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS
	} else if (S_ISLNK(s.st_mode)) {
		@try {
			source = [self destinationOfSymbolicLinkAtPath: source];

			[self createSymbolicLinkAtPath: destination
				   withDestinationPath: source];
		} @catch (id e) {
			/*
			 * Only convert exceptions to OFCopyItemFailedException
			 * that have an errNo property. This covers all I/O







|

|







1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
			@throw e;
		} @finally {
			[sourceFile close];
			[destinationFile close];
			free(buffer);
		}
#ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS
	} else if ([type isEqual: of_file_type_symbolic_link]) {
		@try {
			source = [attributes fileSymbolicLinkDestination];

			[self createSymbolicLinkAtPath: destination
				   withDestinationPath: source];
		} @catch (id e) {
			/*
			 * Only convert exceptions to OFCopyItemFailedException
			 * that have an errNo property. This covers all I/O
1550
1551
1552
1553
1554
1555
1556


1557
1558


1559
1560
1561

1562
1563
1564
1565
1566
1567
1568
1569
1570

1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585

1586
1587
1588
1589


1590
1591

1592
1593


1594
1595
1596
1597
1598


1599

1600
1601
1602
1603
1604
1605
1606
1607
1608
1609

1610
1611
1612
1613
1614
1615

1616
1617
1618
1619


1620
1621
1622
1623
1624
1625



1626
1627
1628
1629
1630
1631

1632
1633
1634
1635
1636

1637
1638

1639
1640
1641
1642
1643
1644
1645
1646
1647
	void *pool = objc_autoreleasePoolPush();

	[self createSymbolicLinkAtPath: [destination fileSystemRepresentation]
		   withDestinationPath: [source fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);
}



- (OFString *)destinationOfSymbolicLinkAtPath: (OFString *)path


{
	if (path == nil)
		@throw [OFInvalidArgumentException exception];


# ifndef OF_WINDOWS
	char destination[PATH_MAX];
	ssize_t length;
	of_string_encoding_t encoding;

	encoding = [OFLocalization encoding];
	length = readlink([path cStringWithEncoding: encoding],
	    destination, PATH_MAX);


	if (length < 0)
		@throw [OFStatItemFailedException exceptionWithPath: path
							      errNo: errno];

	return [OFString stringWithCString: destination
				  encoding: encoding
				    length: length];
# else
	HANDLE handle;

	/* Check if we're on a version that actually supports symlinks. */
	if (func_CreateSymbolicLinkW == NULL)
		@throw [OFNotImplementedException exceptionWithSelector: _cmd
								 object: self];


	if ((handle = CreateFileW([path UTF16String], 0,
	    (FILE_SHARE_READ | FILE_SHARE_WRITE), NULL, OPEN_EXISTING,
	    FILE_FLAG_OPEN_REPARSE_POINT, NULL)) == INVALID_HANDLE_VALUE)


		@throw [OFStatItemFailedException exceptionWithPath: path
							      errNo: 0];


	@try {


		union {
			char bytes[MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
			REPARSE_DATA_BUFFER data;
		} buffer;
		DWORD size;


		wchar_t *tmp;


		if (!DeviceIoControl(handle, FSCTL_GET_REPARSE_POINT, NULL, 0,
		    buffer.bytes, MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &size,
		    NULL))
			@throw [OFStatItemFailedException
			    exceptionWithPath: path
					errNo: 0];

		if (buffer.data.ReparseTag != IO_REPARSE_TAG_SYMLINK)
			@throw [OFStatItemFailedException

			    exceptionWithPath: path
					errNo: 0];

# define slrb buffer.data.SymbolicLinkReparseBuffer
		tmp = slrb.PathBuffer +
		    (slrb.SubstituteNameOffset / sizeof(wchar_t));


		return [OFString
		    stringWithUTF16String: tmp
				   length: slrb.SubstituteNameLength /


					   sizeof(wchar_t)];
# undef slrb
	} @finally {
		CloseHandle(handle);
	}
# endif



}

- (OFString *)destinationOfSymbolicLinkAtURL: (OFURL *)URL
{
	void *pool = objc_autoreleasePoolPush();
	OFString *ret = [self destinationOfSymbolicLinkAtPath:

	    [URL fileSystemRepresentation]];

	[ret retain];

	objc_autoreleasePoolPop(pool);


	return [ret autorelease];

}
#endif
@end

@implementation OFFileManager_default
- (instancetype)autorelease
{
	return self;
}







>
>

<
>
>

<
|
>
|
<
<
<
<

<
<
<
>
|
<
|
<
|
<
<
|
|
<
|
<
<
|
<
>
|
|
<
<
>
>
|
<
>
|
|
>
>
|
<
<
<
<
>
>
|
>
|
<
<
<
|
<
<
|
|
|
>
|
<
|
|
<
<
>
|
|
<
<
>
>
<
<
<
<
|
|
>
>
>


|

<
<
>
|
|
<

<
>
|
|
>

<







1625
1626
1627
1628
1629
1630
1631
1632
1633
1634

1635
1636
1637

1638
1639
1640




1641



1642
1643

1644

1645


1646
1647

1648


1649

1650
1651
1652


1653
1654
1655

1656
1657
1658
1659
1660
1661




1662
1663
1664
1665
1666



1667


1668
1669
1670
1671
1672

1673
1674


1675
1676
1677


1678
1679




1680
1681
1682
1683
1684
1685
1686
1687
1688


1689
1690
1691

1692

1693
1694
1695
1696
1697

1698
1699
1700
1701
1702
1703
1704
	void *pool = objc_autoreleasePoolPush();

	[self createSymbolicLinkAtPath: [destination fileSystemRepresentation]
		   withDestinationPath: [source fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);
}
#endif
@end


@implementation OFDictionary (FileAttributes)
- (uintmax_t)fileSize
{

	return [attributeForKeyOrException(self, of_file_attribute_key_size)
	    uIntMaxValue];
}








- (of_file_type_t)fileType
{

	return attributeForKeyOrException(self, of_file_attribute_key_type);

}



- (uint16_t)filePOSIXPermissions

{


	return [attributeForKeyOrException(self,

	    of_file_attribute_key_posix_permissions) uInt16Value];
}



- (uint32_t)filePOSIXUID
{
	return [attributeForKeyOrException(self,

	    of_file_attribute_key_posix_uid) uInt32Value];
}

- (uint32_t)filePOSIXGID
{
	return [attributeForKeyOrException(self,




	    of_file_attribute_key_posix_gid) uInt32Value];
}

- (OFString *)fileOwner
{



	return attributeForKeyOrException(self, of_file_attribute_key_owner);


}

- (OFString *)fileGroup
{
	return attributeForKeyOrException(self, of_file_attribute_key_group);

}



- (OFDate *)fileLastAccessDate
{
	return attributeForKeyOrException(self,


	    of_file_attribute_key_last_access_date);
}





- (OFDate *)fileModificationDate
{
	return attributeForKeyOrException(self,
	    of_file_attribute_key_modification_date);
}

- (OFDate *)fileStatusChangeDate
{


	return attributeForKeyOrException(self,
	    of_file_attribute_key_status_change_date);
}



- (OFString *)fileSymbolicLinkDestination
{
	return attributeForKeyOrException(self,
	    of_file_attribute_key_symbolic_link_destination);
}

@end

@implementation OFFileManager_default
- (instancetype)autorelease
{
	return self;
}

Modified src/OFString.m from [a97d47a4cf] to [02ef45c9df].

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFInvalidFormatException.h"
#import "OFNotImplementedException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFStatItemFailedException.h"
#import "OFTruncatedDataException.h"
#import "OFUnsupportedProtocolException.h"

#import "of_asprintf.h"
#import "unicode.h"

/*







|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#import "OFInvalidArgumentException.h"
#import "OFInvalidEncodingException.h"
#import "OFInvalidFormatException.h"
#import "OFNotImplementedException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFRetrieveItemAttributesFailedException.h"
#import "OFTruncatedDataException.h"
#import "OFUnsupportedProtocolException.h"

#import "of_asprintf.h"
#import "unicode.h"

/*
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020

1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032

1033

1034
1035

1036
1037
1038
1039
1040
1041
1042
				   encoding: OF_STRING_ENCODING_UTF_8];
}

- (instancetype)initWithContentsOfFile: (OFString *)path
			      encoding: (of_string_encoding_t)encoding
{
	char *tmp;
	of_offset_t fileSize;

	@try {

		OFFile *file;

		@try {
			fileSize = [[OFFileManager defaultManager]
			    sizeOfFileAtPath: path];
		} @catch (OFStatItemFailedException *e) {
			@throw [OFOpenItemFailedException
			    exceptionWithPath: path
					 mode: @"r"
					errNo: errno];
		}


		if (sizeof(of_offset_t) > sizeof(size_t) &&

		    fileSize > (of_offset_t)SIZE_MAX)
			@throw [OFOutOfRangeException exception];


		file = [[OFFile alloc] initWithPath: path
					       mode: @"r"];

		@try {
			tmp = [self allocMemoryWithSize: (size_t)fileSize];








|


>



|
|
|






>
|
>
|

>







1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
				   encoding: OF_STRING_ENCODING_UTF_8];
}

- (instancetype)initWithContentsOfFile: (OFString *)path
			      encoding: (of_string_encoding_t)encoding
{
	char *tmp;
	uintmax_t fileSize;

	@try {
		void *pool = objc_autoreleasePoolPush();
		OFFile *file;

		@try {
			fileSize = [[[OFFileManager defaultManager]
			    attributesOfItemAtPath: path] fileSize];
		} @catch (OFRetrieveItemAttributesFailedException *e) {
			@throw [OFOpenItemFailedException
			    exceptionWithPath: path
					 mode: @"r"
					errNo: errno];
		}

		objc_autoreleasePoolPop(pool);

# if UINTMAX_MAX > SIZE_MAX
		if (fileSize > SIZE_MAX)
			@throw [OFOutOfRangeException exception];
#endif

		file = [[OFFile alloc] initWithPath: path
					       mode: @"r"];

		@try {
			tmp = [self allocMemoryWithSize: (size_t)fileSize];

Modified src/ObjFW.h from [64ad36595d] to [3aca01c885].

119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#ifdef OF_HAVE_SOCKETS
# import "OFAcceptFailedException.h"
# import "OFAddressTranslationFailedException.h"
# import "OFAlreadyConnectedException.h"
# import "OFBindFailedException.h"
#endif
#import "OFChangeCurrentDirectoryPathFailedException.h"
#import "OFChangeOwnerFailedException.h"
#import "OFChangePermissionsFailedException.h"
#import "OFChecksumFailedException.h"
#ifdef OF_HAVE_THREADS
# import "OFConditionBroadcastFailedException.h"
# import "OFConditionSignalFailedException.h"
# import "OFConditionStillWaitingException.h"
# import "OFConditionWaitFailedException.h"
#endif







<
<







119
120
121
122
123
124
125


126
127
128
129
130
131
132
#ifdef OF_HAVE_SOCKETS
# import "OFAcceptFailedException.h"
# import "OFAddressTranslationFailedException.h"
# import "OFAlreadyConnectedException.h"
# import "OFBindFailedException.h"
#endif
#import "OFChangeCurrentDirectoryPathFailedException.h"


#import "OFChecksumFailedException.h"
#ifdef OF_HAVE_THREADS
# import "OFConditionBroadcastFailedException.h"
# import "OFConditionSignalFailedException.h"
# import "OFConditionStillWaitingException.h"
# import "OFConditionWaitFailedException.h"
#endif
165
166
167
168
169
170
171

172
173

174
175
176
177
178
179
180
181
182
#endif
#import "OFOpenItemFailedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFReadOrWriteFailedException.h"
#import "OFRemoveItemFailedException.h"

#import "OFSandboxActivationFailedException.h"
#import "OFSeekFailedException.h"

#import "OFSetOptionFailedException.h"
#import "OFStatItemFailedException.h"
#import "OFStillLockedException.h"
#ifdef OF_HAVE_THREADS
# import "OFThreadJoinFailedException.h"
# import "OFThreadStartFailedException.h"
# import "OFThreadStillRunningException.h"
#endif
#import "OFTruncatedDataException.h"







>


>

<







163
164
165
166
167
168
169
170
171
172
173
174

175
176
177
178
179
180
181
#endif
#import "OFOpenItemFailedException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFReadOrWriteFailedException.h"
#import "OFRemoveItemFailedException.h"
#import "OFRetrieveItemAttributesFailedException.h"
#import "OFSandboxActivationFailedException.h"
#import "OFSeekFailedException.h"
#import "OFSetItemAttributesFailedException.h"
#import "OFSetOptionFailedException.h"

#import "OFStillLockedException.h"
#ifdef OF_HAVE_THREADS
# import "OFThreadJoinFailedException.h"
# import "OFThreadStartFailedException.h"
# import "OFThreadStillRunningException.h"
#endif
#import "OFTruncatedDataException.h"

Modified src/exceptions/Makefile from [4234a1c5c7] to [d57c4e5b68].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
include ../../extra.mk

STATIC_PIC_LIB_NOINST = ${EXCEPTIONS_LIB_A}
STATIC_LIB_NOINST = ${EXCEPTIONS_A}

SRCS = OFAllocFailedException.m				\
       OFChangeCurrentDirectoryPathFailedException.m	\
       OFChangeOwnerFailedException.m			\
       OFChangePermissionsFailedException.m		\
       OFChecksumFailedException.m			\
       OFCopyItemFailedException.m			\
       OFCreateDirectoryFailedException.m		\
       OFCreateSymbolicLinkFailedException.m		\
       OFEnumerationMutationException.m			\
       OFException.m					\
       OFGetOptionFailedException.m			\







<
<







1
2
3
4
5
6
7


8
9
10
11
12
13
14
include ../../extra.mk

STATIC_PIC_LIB_NOINST = ${EXCEPTIONS_LIB_A}
STATIC_LIB_NOINST = ${EXCEPTIONS_A}

SRCS = OFAllocFailedException.m				\
       OFChangeCurrentDirectoryPathFailedException.m	\


       OFChecksumFailedException.m			\
       OFCopyItemFailedException.m			\
       OFCreateDirectoryFailedException.m		\
       OFCreateSymbolicLinkFailedException.m		\
       OFEnumerationMutationException.m			\
       OFException.m					\
       OFGetOptionFailedException.m			\
30
31
32
33
34
35
36

37
38
39
40
41
42
43
44
45
46
47
       OFNotOpenException.m				\
       OFOpenItemFailedException.m			\
       OFOutOfMemoryException.m				\
       OFOutOfRangeException.m				\
       OFReadFailedException.m				\
       OFReadOrWriteFailedException.m			\
       OFRemoveItemFailedException.m			\

       OFSandboxActivationFailedException.m		\
       OFSeekFailedException.m				\
       OFSetOptionFailedException.m			\
       OFStatItemFailedException.m			\
       OFStillLockedException.m				\
       OFTruncatedDataException.m			\
       OFUnboundNamespaceException.m			\
       OFUnboundPrefixException.m			\
       OFUndefinedKeyException.m			\
       OFUnknownXMLEntityException.m			\
       OFUnlockFailedException.m			\







>


|
|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
       OFNotOpenException.m				\
       OFOpenItemFailedException.m			\
       OFOutOfMemoryException.m				\
       OFOutOfRangeException.m				\
       OFReadFailedException.m				\
       OFReadOrWriteFailedException.m			\
       OFRemoveItemFailedException.m			\
       OFRetrieveItemAttributesFailedException.m	\
       OFSandboxActivationFailedException.m		\
       OFSeekFailedException.m				\
       OFSetItemAttributesFailedException.m		\
       OFSetOptionFailedException.m			\
       OFStillLockedException.m				\
       OFTruncatedDataException.m			\
       OFUnboundNamespaceException.m			\
       OFUnboundPrefixException.m			\
       OFUndefinedKeyException.m			\
       OFUnknownXMLEntityException.m			\
       OFUnlockFailedException.m			\

Deleted src/exceptions/OFChangeOwnerFailedException.h version [047184a346].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFException.h"

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFChangeOwnerFailedException \
 *	  OFChangeOwnerFailedException.h ObjFW/OFChangeOwnerFailedException.h
 *
 * @brief An exception indicating that changing the owner of an item failed.
 */
@interface OFChangeOwnerFailedException: OFException
{
	OFString *_path, *_owner, *_group;
	int _errNo;
}

/*!
 * The path of the item.
 */
@property (readonly, nonatomic) OFString *path;

/*!
 * The new owner for the item.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *owner;

/*!
 * The new group for the item.
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *group;

/*!
 * The errno of the error that occurred.
 */
@property (readonly, nonatomic) int errNo;

+ (instancetype)exception OF_UNAVAILABLE;

/*!
 * @brief Creates a new, autoreleased change owner failed exception.
 *
 * @param path The path of the item
 * @param owner The new owner for the item
 * @param group The new group for the item
 * @param errNo The errno of the error that occurred
 * @return A new, autoreleased change owner failed exception
 */
+ (instancetype)exceptionWithPath: (OFString *)path
			    owner: (nullable OFString *)owner
			    group: (nullable OFString *)group
			    errNo: (int)errNo;

- (instancetype)init OF_UNAVAILABLE;

/*!
 * @brief Initializes an already allocated change owner failed exception.
 *
 * @param path The path of the item
 * @param owner The new owner for the item
 * @param group The new group for the item
 * @param errNo The errno of the error that occurred
 * @return An initialized change owner failed exception
 */
- (instancetype)initWithPath: (OFString *)path
		       owner: (nullable OFString *)owner
		       group: (nullable OFString *)group
		       errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end

OF_ASSUME_NONNULL_END
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































































Deleted src/exceptions/OFChangeOwnerFailedException.m version [45d05457a0].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFChangeOwnerFailedException.h"
#import "OFString.h"

@implementation OFChangeOwnerFailedException
@synthesize path = _path, owner = _owner, group = _group, errNo = _errNo;

+ (instancetype)exception
{
	OF_UNRECOGNIZED_SELECTOR
}

+ (instancetype)exceptionWithPath: (OFString *)path
			    owner: (OFString *)owner
			    group: (OFString *)group
			    errNo: (int)errNo
{
	return [[[self alloc] initWithPath: path
				     owner: owner
				     group: group
				     errNo: errNo] autorelease];
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithPath: (OFString *)path
		       owner: (OFString *)owner
		       group: (OFString *)group
		       errNo: (int)errNo
{
	self = [super init];

	@try {
		_path  = [path copy];
		_owner = [owner copy];
		_group = [group copy];
		_errNo = errNo;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (void)dealloc
{
	[_path release];
	[_owner release];
	[_group release];

	[super dealloc];
}

- (OFString *)description
{
	if (_group == nil)
		return [OFString stringWithFormat:
		    @"Failed to change owner of item at path %@ to %@: %@",
		    _path, _owner, of_strerror(_errNo)];
	else if (_owner == nil)
		return [OFString stringWithFormat:
		    @"Failed to change group of item at path %@ to %@: %@",
		     _path, _group, of_strerror(_errNo)];
	else
		return [OFString stringWithFormat:
		    @"Failed to change owner of item at path %@ to %@:%@: %@",
		    _path, _owner, _group, of_strerror(_errNo)];
}
@end
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<




















































































































































































Deleted src/exceptions/OFChangePermissionsFailedException.h version [e21328b322].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFException.h"

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFChangePermissionsFailedException \
 *	  OFChangePermissionsFailedException.h \
 *	  ObjFW/OFChangePermissionsFailedException.h
 *
 * @brief An exception indicating that changing the permissions of an item
 *	  failed.
 */
@interface OFChangePermissionsFailedException: OFException
{
	OFString *_path;
	uint16_t _permissions;
	int _errNo;
}

/*!
 * The path of the item.
 */
@property (readonly, nonatomic) OFString *path;

/*!
 * The new permissions for the item.
 */
@property (readonly, nonatomic) uint16_t permissions;

/*!
 * The errno of the error that occurred.
 */
@property (readonly, nonatomic) int errNo;

+ (instancetype)exception OF_UNAVAILABLE;

/*!
 * @brief Creates a new, autoreleased change permissions failed exception.
 *
 * @param path The path of the item
 * @param permissions The new permissions for the item
 * @param errNo The errno of the error that occurred
 * @return A new, autoreleased change permissions failed exception
 */
+ (instancetype)exceptionWithPath: (OFString *)path
		      permissions: (uint16_t)permissions
			    errNo: (int)errNo;

- (instancetype)init OF_UNAVAILABLE;

/*!
 * @brief Initializes an already allocated change permissions failed exception.
 *
 * @param path The path of the item
 * @param permissions The new permissions for the item
 * @param errNo The errno of the error that occurred
 * @return An initialized change permissions failed exception
 */
- (instancetype)initWithPath: (OFString *)path
		 permissions: (uint16_t)permissions
		       errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end

OF_ASSUME_NONNULL_END
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
































































































































































Deleted src/exceptions/OFChangePermissionsFailedException.m version [63b300e4d8].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFChangePermissionsFailedException.h"
#import "OFString.h"

@implementation OFChangePermissionsFailedException
@synthesize path = _path, permissions = _permissions, errNo = _errNo;

+ (instancetype)exception
{
	OF_UNRECOGNIZED_SELECTOR
}

+ (instancetype)exceptionWithPath: (OFString *)path
		      permissions: (uint16_t)permissions
			    errNo: (int)errNo
{
	return [[[self alloc] initWithPath: path
			       permissions: permissions
				     errNo: errNo] autorelease];
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithPath: (OFString *)path
		 permissions: (uint16_t)permissions
		       errNo: (int)errNo
{
	self = [super init];

	@try {
		_path = [path copy];
		_permissions = permissions;
		_errNo = errNo;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (void)dealloc
{
	[_path release];

	[super dealloc];
}

- (OFString *)description
{
	return [OFString stringWithFormat:
	    @"Failed to change permissions of item at path %@ to %04o: %@",
	    _path, _permissions, of_strerror(_errNo)];
}
@end
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<






















































































































































Added src/exceptions/OFRetrieveItemAttributesFailedException.h version [b436ab4451].

















































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFException.h"

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFRetrieveItemAttributesFailedException \
 *	  OFRetrieveItemAttributesFailedException.h \
 *	  ObjFW/OFRetrieveItemAttributesFailedException.h
 *
 * @brief An exception indicating an item's attributes could not be retrieved.
 */
@interface OFRetrieveItemAttributesFailedException: OFException
{
	OFString *_path;
	int _errNo;
}

/*!
 * A string with the path of the item whose attributes could not be retrieved.
 */
@property (readonly, nonatomic) OFString *path;

/*!
 * The errno of the error that occurred.
 */
@property (readonly, nonatomic) int errNo;

+ (instancetype)exception OF_UNAVAILABLE;

/*!
 * @brief Creates a new, autoreleased retrieve item attributes failed exception.
 *
 * @param path A string with the path of the item whose attributes could not be
 *	       retrieved
 * @param errNo The errno of the error that occurred
 * @return A new, autoreleased retrieve item attributes failed exception
 */
+ (instancetype)exceptionWithPath: (OFString *)path
			    errNo: (int)errNo;

- (instancetype)init OF_UNAVAILABLE;

/*!
 * @brief Initializes an already allocated retrieve item attributes failed
 *	  exception.
 *
 * @param path A string with the path of the item whose attributes could not be
 *	       retrieved
 * @param errNo The errno of the error that occurred
 * @return An initialized retrieve item attributes failed exception
 */
- (instancetype)initWithPath: (OFString *)path
		       errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end

OF_ASSUME_NONNULL_END

Added src/exceptions/OFRetrieveItemAttributesFailedException.m version [a424242675].















































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFRetrieveItemAttributesFailedException.h"
#import "OFString.h"

@implementation OFRetrieveItemAttributesFailedException
@synthesize path = _path, errNo = _errNo;

+ (instancetype)exception
{
	OF_UNRECOGNIZED_SELECTOR
}

+ (instancetype)exceptionWithPath: (OFString *)path
			    errNo: (int)errNo
{
	return [[[self alloc] initWithPath: path
				     errNo: errNo] autorelease];
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithPath: (OFString *)path
		       errNo: (int)errNo
{
	self = [super init];

	@try {
		_path  = [path copy];
		_errNo = errNo;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (void)dealloc
{
	[_path release];

	[super dealloc];
}

- (OFString *)description
{
	return [OFString stringWithFormat:
	    @"Failed to retrieve attributes for item %@: %@",
	    _path, of_strerror(_errNo)];
}
@end

Added src/exceptions/OFSetItemAttributesFailedException.h version [174d24e615].





























































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFException.h"
#import "OFFileManager.h"

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFSetItemAttributesFailedException \
 *	  OFSetItemAttributesFailedException.h \
 *	  ObjFW/OFSetItemAttributesFailedException.h
 *
 * @brief An exception indicating an item's attributes could not be set.
 */
@interface OFSetItemAttributesFailedException: OFException
{
	OFString *_path;
	of_file_attributes_t _attributes;
	of_file_attribute_key_t _failedAttribute;
	int _errNo;
}

/*!
 * A string with the path of the item whose attributes could not be set.
 */
@property (readonly, nonatomic) OFString *path;

/*!
 * The errno of the error that occurred.
 */
@property (readonly, nonatomic) int errNo;

/*!
 * The attributes that should have been set.
 */
@property (readonly, nonatomic) of_file_attributes_t attributes;

/*!
 * The first attribute that could not be set.
 */
@property (readonly, nonatomic) of_file_attribute_key_t failedAttribute;

+ (instancetype)exception OF_UNAVAILABLE;

/*!
 * @brief Creates a new, autoreleased set item attributes failed exception.
 *
 * @param path A string with the path of the item whose attributes could not be
 *	       set
 * @param attributes The attributes that should have been set for the specified
 *		     item.
 * @param failedAttribute The first attribute that could not be set
 * @param errNo The errno of the error that occurred
 * @return A new, autoreleased set item attributes failed exception
 */
+ (instancetype)exceptionWithPath: (OFString *)path
		       attributes: (of_file_attributes_t)attributes
		  failedAttribute: (of_file_attribute_key_t)failedAttribute
			    errNo: (int)errNo;

- (instancetype)init OF_UNAVAILABLE;

/*!
 * @brief Initializes an already allocated set item attributes failed exception.
 *
 * @param path A string with the path of the item whose attributes could not be
 *	       set
 * @param attributes The attributes that should have been set for the specified
 *		     item.
 * @param failedAttribute The first attribute that could not be set
 * @param errNo The errno of the error that occurred
 * @return An initialized set item attributes failed exception
 */
- (instancetype)initWithPath: (OFString *)path
		  attributes: (of_file_attributes_t)attributes
	     failedAttribute: (of_file_attribute_key_t)failedAttribute
		       errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end

OF_ASSUME_NONNULL_END

Added src/exceptions/OFSetItemAttributesFailedException.m version [e8274356e5].





































































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFSetItemAttributesFailedException.h"
#import "OFString.h"

@implementation OFSetItemAttributesFailedException
@synthesize path = _path, attributes = _attributes;
@synthesize failedAttribute = _failedAttribute, errNo = _errNo;

+ (instancetype)exception
{
	OF_UNRECOGNIZED_SELECTOR
}

+ (instancetype)exceptionWithPath: (OFString *)path
		       attributes: (of_file_attributes_t)attributes
		  failedAttribute: (of_file_attribute_key_t)failedAttribute
			    errNo: (int)errNo
{
	return [[[self alloc] initWithPath: path
				attributes: attributes
			   failedAttribute: failedAttribute
				     errNo: errNo] autorelease];
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithPath: (OFString *)path
		  attributes: (of_file_attributes_t)attributes
	     failedAttribute: (of_file_attribute_key_t)failedAttribute
		       errNo: (int)errNo
{
	self = [super init];

	@try {
		_path = [path copy];
		_attributes = [attributes copy];
		_failedAttribute = [failedAttribute copy];
		_errNo = errNo;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (void)dealloc
{
	[_path release];
	[_attributes release];
	[_failedAttribute release];

	[super dealloc];
}

- (OFString *)description
{
	return [OFString stringWithFormat:
	    @"Failed to set attribute %@ for item %@: %@",
	    _failedAttribute, _path, of_strerror(_errNo)];
}
@end

Deleted src/exceptions/OFStatItemFailedException.h version [f307ae7896].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#import "OFException.h"

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFStatItemFailedException \
 *	  OFStatItemFailedException.h ObjFW/OFStatItemFailedException.h
 *
 * @brief An exception indicating an item's status could not be retrieved.
 */
@interface OFStatItemFailedException: OFException
{
	OFString *_path;
	int _errNo;
}

/*!
 * A string with the path of the item whose status could not be retrieved.
 */
@property (readonly, nonatomic) OFString *path;

/*!
 * The errno of the error that occurred.
 */
@property (readonly, nonatomic) int errNo;

+ (instancetype)exception OF_UNAVAILABLE;

/*!
 * @brief Creates a new, autoreleased stat item failed exception.
 *
 * @param path A string with the path of the item whose status could not be
 *	       retrieved
 * @param errNo The errno of the error that occurred
 * @return A new, autoreleased stat item failed exception
 */
+ (instancetype)exceptionWithPath: (OFString *)path
			    errNo: (int)errNo;

- (instancetype)init OF_UNAVAILABLE;

/*!
 * @brief Initializes an already allocated stat item failed exception.
 *
 * @param path A string with the path of the item whose status could not be
 *	       retrieved
 * @param errNo The errno of the error that occurred
 * @return An initialized stat item failed exception
 */
- (instancetype)initWithPath: (OFString *)path
		       errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end

OF_ASSUME_NONNULL_END
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































Deleted src/exceptions/OFStatItemFailedException.m version [ded2d947a2].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
 * Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017
 *   Jonathan Schleifer <js@heap.zone>
 *
 * All rights reserved.
 *
 * This file is part of ObjFW. It may be distributed under the terms of the
 * Q Public License 1.0, which can be found in the file LICENSE.QPL included in
 * the packaging of this file.
 *
 * Alternatively, it may be distributed under the terms of the GNU General
 * Public License, either version 2 or 3, which can be found in the file
 * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
 * file.
 */

#include "config.h"

#import "OFStatItemFailedException.h"
#import "OFString.h"

@implementation OFStatItemFailedException
@synthesize path = _path, errNo = _errNo;

+ (instancetype)exception
{
	OF_UNRECOGNIZED_SELECTOR
}

+ (instancetype)exceptionWithPath: (OFString *)path
			    errNo: (int)errNo
{
	return [[[self alloc] initWithPath: path
				     errNo: errNo] autorelease];
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithPath: (OFString *)path
		       errNo: (int)errNo
{
	self = [super init];

	@try {
		_path  = [path copy];
		_errNo = errNo;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (void)dealloc
{
	[_path release];

	[super dealloc];
}

- (OFString *)description
{
	return [OFString stringWithFormat:
	    @"Failed to stat item %@: %@", _path, of_strerror(_errNo)];
}
@end
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<












































































































































Modified src/exceptions/OFUndefinedKeyException.h from [2cf6faae58] to [e74205bb71].

18
19
20
21
22
23
24
25

26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFUndefinedKeyException \
 *	  OFUndefinedKeyException.h ObjFW/OFUndefinedKeyException.h
 *
 * @brief An exception indicating that a key for Key Value Coding is undefined.

 */
@interface OFUndefinedKeyException: OFException
{
	id _object;
	OFString *_key;
	id _value;
}

/*!
 * The object on which the key is undefined.
 */
@property (readonly, nonatomic) id object;

/*!
 * The key which is undefined.
 */
@property (readonly, nonatomic) OFString *key;

/*!
 * The value for the undefined key
 */
@property (readonly, nonatomic) id value;

+ (instancetype)exception OF_UNAVAILABLE;

/*!
 * @brief Creates a new, autoreleased undefined key exception.
 *
 * @param object The object on which the key is undefined







|
>





|















|







18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

OF_ASSUME_NONNULL_BEGIN

/*!
 * @class OFUndefinedKeyException \
 *	  OFUndefinedKeyException.h ObjFW/OFUndefinedKeyException.h
 *
 * @brief An exception indicating that a key is undefined (e.g. for Key Value
 *	  Coding).
 */
@interface OFUndefinedKeyException: OFException
{
	id _object;
	OFString *_key;
	id _Nullable _value;
}

/*!
 * The object on which the key is undefined.
 */
@property (readonly, nonatomic) id object;

/*!
 * The key which is undefined.
 */
@property (readonly, nonatomic) OFString *key;

/*!
 * The value for the undefined key
 */
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) id value;

+ (instancetype)exception OF_UNAVAILABLE;

/*!
 * @brief Creates a new, autoreleased undefined key exception.
 *
 * @param object The object on which the key is undefined

Modified utils/ofhttp/OFHTTP.m from [46acc91009] to [e43d76979b].

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#import "OFConnectionFailedException.h"
#import "OFHTTPRequestFailedException.h"
#import "OFInvalidFormatException.h"
#import "OFInvalidServerReplyException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFStatItemFailedException.h"
#import "OFUnsupportedProtocolException.h"
#import "OFWriteFailedException.h"

#import "ProgressBar.h"

#define GIBIBYTE (1024 * 1024 * 1024)
#define MEBIBYTE (1024 * 1024)







|







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#import "OFConnectionFailedException.h"
#import "OFHTTPRequestFailedException.h"
#import "OFInvalidFormatException.h"
#import "OFInvalidServerReplyException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfRangeException.h"
#import "OFReadFailedException.h"
#import "OFRetrieveItemAttributesFailedException.h"
#import "OFUnsupportedProtocolException.h"
#import "OFWriteFailedException.h"

#import "ProgressBar.h"

#define GIBIBYTE (1024 * 1024 * 1024)
#define MEBIBYTE (1024 * 1024)
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
	}

	if (_currentFileName == nil)
		_currentFileName = [[[URL path] lastPathComponent] copy];

	if (_continue) {
		@try {
			of_offset_t size = [[OFFileManager defaultManager]
			    sizeOfFileAtPath: _currentFileName];
			OFString *range;

			if (size > INTMAX_MAX)
				@throw [OFOutOfRangeException exception];

			_resumedFrom = (intmax_t)size;

			range = [OFString stringWithFormat: @"bytes=%jd-",
							    _resumedFrom];
			[clientHeaders setObject: range
					  forKey: @"Range"];
		} @catch (OFStatItemFailedException *e) {
		}
	}

	request = [OFHTTPRequest requestWithURL: URL];
	[request setHeaders: clientHeaders];
	[request setMethod: _method];
	[request setBody: _body];







|
|











|







930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
	}

	if (_currentFileName == nil)
		_currentFileName = [[[URL path] lastPathComponent] copy];

	if (_continue) {
		@try {
			uintmax_t size = [[[OFFileManager defaultManager]
			    attributesOfItemAtPath: _currentFileName] fileSize];
			OFString *range;

			if (size > INTMAX_MAX)
				@throw [OFOutOfRangeException exception];

			_resumedFrom = (intmax_t)size;

			range = [OFString stringWithFormat: @"bytes=%jd-",
							    _resumedFrom];
			[clientHeaders setObject: range
					  forKey: @"Range"];
		} @catch (OFRetrieveItemAttributesFailedException *e) {
		}
	}

	request = [OFHTTPRequest requestWithURL: URL];
	[request setHeaders: clientHeaders];
	[request setMethod: _method];
	[request setBody: _body];

Modified utils/ofzip/GZIPArchive.m from [c97ab3d19b] to [b351c0ed90].

27
28
29
30
31
32
33

34




35

36
37
38
39
40
41
42
43
44
static OFZIP *app;

static void
setPermissions(OFString *destination, OFString *source)
{
#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
	OFFileManager *fileManager = [OFFileManager defaultManager];

	uint16_t mode = [fileManager permissionsOfItemAtPath: source];






	[fileManager changePermissionsOfItemAtPath: destination
				       permissions: mode];
#endif
}

@implementation GZIPArchive
+ (void)initialize
{
	if (self == [GZIPArchive class])







>
|
>
>
>
>

>
|
<







27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42

43
44
45
46
47
48
49
static OFZIP *app;

static void
setPermissions(OFString *destination, OFString *source)
{
#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
	OFFileManager *fileManager = [OFFileManager defaultManager];
	of_file_attributes_t attributes =
	    [fileManager attributesOfItemAtPath: source];
	of_file_attribute_key_t key = of_file_attribute_key_size;
	of_file_attributes_t destinationAttributes = [OFDictionary
	    dictionaryWithObject: [attributes objectForKey: key]
			  forKey: key];

	[fileManager setAttributes: destinationAttributes
		      ofItemAtPath: destination];

#endif
}

@implementation GZIPArchive
+ (void)initialize
{
	if (self == [GZIPArchive class])

Modified utils/ofzip/TarArchive.m from [402b43560b] to [f838c45385].

14
15
16
17
18
19
20

21
22

23
24
25
26
27
28
29
30
31
32
33
34
35
36




37
38
39
40
41
42
43
44
45
46
 * file.
 */

#include "config.h"

#include <inttypes.h>


#import "OFDate.h"
#import "OFSet.h"

#import "OFApplication.h"
#import "OFFileManager.h"
#import "OFStdIOStream.h"
#import "OFLocalization.h"

#import "TarArchive.h"
#import "OFZIP.h"

static OFZIP *app;

static void
setPermissions(OFString *path, OFTarArchiveEntry *entry)
{
#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS




	[[OFFileManager defaultManager]
	    changePermissionsOfItemAtPath: path
			      permissions: [entry mode]];
#endif
}

@implementation TarArchive
+ (void)initialize
{
	if (self == [TarArchive class])







>

|
>
|
|

<










>
>
>
>
|
|
<







14
15
16
17
18
19
20
21
22
23
24
25
26
27

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

44
45
46
47
48
49
50
 * file.
 */

#include "config.h"

#include <inttypes.h>

#import "OFApplication.h"
#import "OFDate.h"
#import "OFFileManager.h"
#import "OFLocalization.h"
#import "OFNumber.h"
#import "OFSet.h"
#import "OFStdIOStream.h"


#import "TarArchive.h"
#import "OFZIP.h"

static OFZIP *app;

static void
setPermissions(OFString *path, OFTarArchiveEntry *entry)
{
#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
	of_file_attributes_t attributes = [OFDictionary
	    dictionaryWithObject: [OFNumber numberWithUInt16: [entry mode]]
			  forKey: of_file_attribute_key_posix_permissions];

	[[OFFileManager defaultManager] setAttributes: attributes
					 ofItemAtPath: path];

#endif
}

@implementation TarArchive
+ (void)initialize
{
	if (self == [TarArchive class])
452
453
454
455
456
457
458


459
460
461
462
463
464
465
466


467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
		    @"Need one or more files to add!")];
		app->_exitStatus = 1;
		return;
	}

	for (OFString *fileName in files) {
		void *pool = objc_autoreleasePoolPush();


		OFMutableTarArchiveEntry *entry;
		OFStream *output;

		if (app->_outputLevel >= 0)
			[of_stdout writeString: OF_LOCALIZED(@"adding_file",
			    @"Adding %[file]...",
			    @"file", fileName)];



		entry = [OFMutableTarArchiveEntry entryWithFileName: fileName];

#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
		[entry setMode:
		    [fileManager permissionsOfItemAtPath: fileName]];
#endif
		[entry setSize: [fileManager sizeOfFileAtPath: fileName]];
		[entry setModificationDate:
		    [fileManager modificationDateOfItemAtPath: fileName]];

#ifdef OF_FILE_MANAGER_SUPPORTS_OWNER
		uint16_t UID, GID;
		OFString *owner, *group;

		[fileManager getUID: &UID
				GID: &GID
		       ofItemAtPath: fileName];
		[fileManager getOwner: &owner
				group: &group
			 ofItemAtPath: fileName];

		[entry setUID: UID];
		[entry setGID: GID];
		[entry setOwner: owner];
		[entry setGroup: group];
#endif

		if ([fileManager fileExistsAtPath: fileName])
			[entry setType: OF_TAR_ARCHIVE_ENTRY_TYPE_FILE];
		else if ([fileManager directoryExistsAtPath: fileName]) {
			[entry setType: OF_TAR_ARCHIVE_ENTRY_TYPE_DIRECTORY];
			[entry setSize: 0];
		} else if ([fileManager symbolicLinkExistsAtPath: fileName]) {
			[entry setType: OF_TAR_ARCHIVE_ENTRY_TYPE_SYMLINK];
			[entry setTargetFileName: [fileManager
			    destinationOfSymbolicLinkAtPath: fileName]];
			[entry setSize: 0];
		}

		[entry makeImmutable];

		output = [_archive streamForWritingEntry: entry];








>
>








>
>



|
<

|
|
<


<
<
<
<
<
<
<
<
<
<
|
|
|
|


|

|


|

|
|







456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478

479
480
481

482
483










484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
		    @"Need one or more files to add!")];
		app->_exitStatus = 1;
		return;
	}

	for (OFString *fileName in files) {
		void *pool = objc_autoreleasePoolPush();
		of_file_attributes_t attributes;
		of_file_type_t type;
		OFMutableTarArchiveEntry *entry;
		OFStream *output;

		if (app->_outputLevel >= 0)
			[of_stdout writeString: OF_LOCALIZED(@"adding_file",
			    @"Adding %[file]...",
			    @"file", fileName)];

		attributes = [fileManager attributesOfItemAtPath: fileName];
		type = [attributes fileType];
		entry = [OFMutableTarArchiveEntry entryWithFileName: fileName];

#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
		[entry setMode: [attributes filePOSIXPermissions]];

#endif
		[entry setSize: [attributes fileSize]];
		[entry setModificationDate: [attributes fileModificationDate]];


#ifdef OF_FILE_MANAGER_SUPPORTS_OWNER










		[entry setUID: [attributes filePOSIXUID]];
		[entry setGID: [attributes filePOSIXGID]];
		[entry setOwner: [attributes fileOwner]];
		[entry setGroup: [attributes fileGroup]];
#endif

		if ([type isEqual: of_file_type_regular])
			[entry setType: OF_TAR_ARCHIVE_ENTRY_TYPE_FILE];
		else if ([type isEqual: of_file_type_directory]) {
			[entry setType: OF_TAR_ARCHIVE_ENTRY_TYPE_DIRECTORY];
			[entry setSize: 0];
		} else if ([type isEqual: of_file_type_symbolic_link]) {
			[entry setType: OF_TAR_ARCHIVE_ENTRY_TYPE_SYMLINK];
			[entry setTargetFileName:
			    [attributes fileSymbolicLinkDestination]];
			[entry setSize: 0];
		}

		[entry makeImmutable];

		output = [_archive streamForWritingEntry: entry];

Modified utils/ofzip/ZIPArchive.m from [6d91678c4e] to [e4521c77ed].

15
16
17
18
19
20
21

22
23

24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44





45
46
47
48
49
50
51
52
53
54
55
 */

#include "config.h"

#include <inttypes.h>
#include <errno.h>


#import "OFDate.h"
#import "OFSet.h"

#import "OFApplication.h"
#import "OFFileManager.h"
#import "OFStdIOStream.h"
#import "OFLocalization.h"

#import "ZIPArchive.h"
#import "OFZIP.h"

#import "OFInvalidFormatException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfRangeException.h"

static OFZIP *app;

static void
setPermissions(OFString *path, OFZIPArchiveEntry *entry)
{
#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
	if (([entry versionMadeBy] >> 8) ==
	    OF_ZIP_ARCHIVE_ENTRY_ATTR_COMPAT_UNIX) {
		uint16_t mode = [entry versionSpecificAttributes] >> 16;






		[[OFFileManager defaultManager]
		    changePermissionsOfItemAtPath: path
				      permissions: mode];
	}
#endif
}

@implementation ZIPArchive
+ (void)initialize
{







>

|
>
|
|

<

















>
>
>
>
>

|
|
<







15
16
17
18
19
20
21
22
23
24
25
26
27
28

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

54
55
56
57
58
59
60
 */

#include "config.h"

#include <inttypes.h>
#include <errno.h>

#import "OFApplication.h"
#import "OFDate.h"
#import "OFFileManager.h"
#import "OFLocalization.h"
#import "OFNumber.h"
#import "OFSet.h"
#import "OFStdIOStream.h"


#import "ZIPArchive.h"
#import "OFZIP.h"

#import "OFInvalidFormatException.h"
#import "OFOpenItemFailedException.h"
#import "OFOutOfRangeException.h"

static OFZIP *app;

static void
setPermissions(OFString *path, OFZIPArchiveEntry *entry)
{
#ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS
	if (([entry versionMadeBy] >> 8) ==
	    OF_ZIP_ARCHIVE_ENTRY_ATTR_COMPAT_UNIX) {
		uint16_t mode = [entry versionSpecificAttributes] >> 16;
		of_file_attribute_key_t key =
		    of_file_attribute_key_posix_permissions;
		of_file_attributes_t attributes = [OFDictionary
		    dictionaryWithObject: [OFNumber numberWithUInt16: mode]
				  forKey: key];

		[[OFFileManager defaultManager] setAttributes: attributes
						 ofItemAtPath: path];

	}
#endif
}

@implementation ZIPArchive
+ (void)initialize
{
384
385
386
387
388
389
390

391
392
393
394
395
396
397
398

399


400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
		return;
	}

	for (OFString *localFileName in files) {
		void *pool = objc_autoreleasePoolPush();
		OFArray OF_GENERIC (OFString *) *components;
		OFString *fileName;

		bool isDirectory = false;
		OFMutableZIPArchiveEntry *entry;
		of_offset_t size;
		OFStream *output;

		components = [localFileName pathComponents];
		fileName = [components componentsJoinedByString: @"/"];


		if ([fileManager directoryExistsAtPath: localFileName]) {


			isDirectory = true;
			fileName = [fileName stringByAppendingString: @"/"];
		}

		if (app->_outputLevel >= 0)
			[of_stdout writeString: OF_LOCALIZED(@"adding_file",
			    @"Adding %[file]...",
			    @"file", fileName)];

		entry = [OFMutableZIPArchiveEntry entryWithFileName: fileName];

		if (isDirectory)
			size = 0;
		else
			size = [fileManager sizeOfFileAtPath: localFileName];

		if (size > INT64_MAX)
			@throw [OFOutOfRangeException exception];

		[entry setCompressedSize: (int64_t)size];
		[entry setUncompressedSize: (int64_t)size];

		[entry setCompressionMethod:
		    OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_NONE];
		[entry setModificationDate:
		    [fileManager modificationDateOfItemAtPath: localFileName]];

		[entry makeImmutable];

		output = [_archive streamForWritingEntry: entry];

		if (!isDirectory) {
			int64_t written = 0;
			int8_t percent = -1, newPercent;

			OFFile *input = [OFFile fileWithPath: fileName
							mode: @"r"];

			while (![input isAtEndOfStream]) {
				ssize_t length = [app







>


|





>
|
>
>














|









|
<






|







389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433

434
435
436
437
438
439
440
441
442
443
444
445
446
447
		return;
	}

	for (OFString *localFileName in files) {
		void *pool = objc_autoreleasePoolPush();
		OFArray OF_GENERIC (OFString *) *components;
		OFString *fileName;
		of_file_attributes_t attributes;
		bool isDirectory = false;
		OFMutableZIPArchiveEntry *entry;
		uintmax_t size;
		OFStream *output;

		components = [localFileName pathComponents];
		fileName = [components componentsJoinedByString: @"/"];

		attributes = [fileManager
		    attributesOfItemAtPath: localFileName];

		if ([[attributes fileType] isEqual: of_file_type_directory]) {
			isDirectory = true;
			fileName = [fileName stringByAppendingString: @"/"];
		}

		if (app->_outputLevel >= 0)
			[of_stdout writeString: OF_LOCALIZED(@"adding_file",
			    @"Adding %[file]...",
			    @"file", fileName)];

		entry = [OFMutableZIPArchiveEntry entryWithFileName: fileName];

		if (isDirectory)
			size = 0;
		else
			size = [attributes fileSize];

		if (size > INT64_MAX)
			@throw [OFOutOfRangeException exception];

		[entry setCompressedSize: (int64_t)size];
		[entry setUncompressedSize: (int64_t)size];

		[entry setCompressionMethod:
		    OF_ZIP_ARCHIVE_ENTRY_COMPRESSION_METHOD_NONE];
		[entry setModificationDate: [attributes fileModificationDate]];


		[entry makeImmutable];

		output = [_archive streamForWritingEntry: entry];

		if (!isDirectory) {
			uintmax_t written = 0;
			int8_t percent = -1, newPercent;

			OFFile *input = [OFFile fileWithPath: fileName
							mode: @"r"];

			while (![input isAtEndOfStream]) {
				ssize_t length = [app