ObjFW  Diff

Differences From Artifact [b1663cc4e4]:

To Artifact [344a7c8de0]:


612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
# 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







|
<







612
613
614
615
616
617
618
619

620
621
622
623
624
625
626
# endif
		@throw [OFSetItemAttributesFailedException
		    exceptionWithPath: path
			   attributes: attributes
		      failedAttribute: of_file_attribute_key_posix_permissions
				errNo: errno];
#else
	OF_UNRECOGNIZED_SELECTOR

#endif
}

- (void)of_setOwner: (OFString *)owner
	   andGroup: (OFString *)group
       ofItemAtPath: (OFString *)path
       attributeKey: (of_file_attribute_key_t)attributeKey
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
	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;







|
<







676
677
678
679
680
681
682
683

684
685
686
687
688
689
690
	if (chown([path cStringWithEncoding: encoding], uid, gid) != 0)
		@throw [OFSetItemAttributesFailedException
		    exceptionWithPath: path
			   attributes: attributes
		      failedAttribute: attributeKey
				errNo: errno];
#else
	OF_UNRECOGNIZED_SELECTOR

#endif
}

- (void)setAttributes: (of_file_attributes_t)attributes
	 ofItemAtPath: (OFString *)path
{
	void *pool;
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
	void *pool = objc_autoreleasePoolPush();

	[self linkItemAtPath: [source fileSystemRepresentation]
		      toPath: [destination fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);
#else
	@throw [OFNotImplementedException exceptionWithSelector: _cmd
							 object: self];
#endif
}

#ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS
- (void)createSymbolicLinkAtPath: (OFString *)destination
	     withDestinationPath: (OFString *)source
{







|
<







1577
1578
1579
1580
1581
1582
1583
1584

1585
1586
1587
1588
1589
1590
1591
	void *pool = objc_autoreleasePoolPush();

	[self linkItemAtPath: [source fileSystemRepresentation]
		      toPath: [destination fileSystemRepresentation]];

	objc_autoreleasePoolPop(pool);
#else
	OF_UNRECOGNIZED_SELECTOR

#endif
}

#ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS
- (void)createSymbolicLinkAtPath: (OFString *)destination
	     withDestinationPath: (OFString *)source
{
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
# endif

	objc_autoreleasePoolPop(pool);
}
#endif

- (void)createSymbolicLinkAtURL: (OFURL *)destination
	     withDestinationURL: (OFURL *)source
{
#ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS
	void *pool = objc_autoreleasePoolPush();

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

	objc_autoreleasePoolPop(pool);
#else
	@throw [OFNotImplementedException exceptionWithSelector: _cmd
							 object: self];
#endif
}
@end

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







|





|



|
<







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
# endif

	objc_autoreleasePoolPop(pool);
}
#endif

- (void)createSymbolicLinkAtURL: (OFURL *)destination
	    withDestinationPath: (OFString *)source
{
#ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS
	void *pool = objc_autoreleasePoolPush();

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

	objc_autoreleasePoolPop(pool);
#else
	OF_UNRECOGNIZED_SELECTOR

#endif
}
@end

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