Differences From Artifact [b404d9c716]:
- File src/OFFileURLHandler.m — part of check-in [b6cb3addd0] at 2020-06-28 15:03:23 on branch trunk — Use OF_DIRECT(_MEMBERS) where appropriate (user: js, size: 36597) [annotate] [blame] [check-ins using] [more...]
To Artifact [987947edfd]:
- File
src/OFFileURLHandler.m
— part of check-in
[25c985fec1]
at
2020-08-25 00:11:24
on branch trunk
— OFNumber: Remove (u)int{8,16,32,64} methods
Since C guarantees minimum sizes for char, short, int, long and long
long, these can be used instead. (user: js, size: 36621) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
407 408 409 410 411 412 413 | } static void setOwnerAndGroupAttributes(of_mutable_file_attributes_t attributes, of_stat_t *s) { #ifdef OF_FILE_MANAGER_SUPPORTS_OWNER | | | | 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 | } static void setOwnerAndGroupAttributes(of_mutable_file_attributes_t attributes, of_stat_t *s) { #ifdef OF_FILE_MANAGER_SUPPORTS_OWNER [attributes setObject: [NSNumber numberWithUnsignedLong: s->st_uid] forKey: of_file_attribute_key_posix_uid]; [attributes setObject: [NSNumber numberWithUnsignedLong: s->st_gid] forKey: of_file_attribute_key_posix_gid]; # ifdef OF_HAVE_THREADS [passwdMutex lock]; @try { # endif of_string_encoding_t encoding = [OFLocale encoding]; |
︙ | ︙ | |||
616 617 618 619 620 621 622 | @throw [OFRetrieveItemAttributesFailedException exceptionWithURL: URL errNo: errno]; if (s.st_size < 0) @throw [OFOutOfRangeException exception]; | | | | 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | @throw [OFRetrieveItemAttributesFailedException exceptionWithURL: URL errNo: errno]; if (s.st_size < 0) @throw [OFOutOfRangeException exception]; [ret setObject: [NSNumber numberWithUnsignedLongLong: s.st_size] forKey: of_file_attribute_key_size]; setTypeAttribute(ret, &s); [ret setObject: [NSNumber numberWithUnsignedLong: s.st_mode] forKey: of_file_attribute_key_posix_permissions]; setOwnerAndGroupAttributes(ret, &s); setDateAttributes(ret, &s); #ifdef OF_FILE_MANAGER_SUPPORTS_SYMLINKS if (S_ISLNK(s.st_mode)) |
︙ | ︙ | |||
756 757 758 759 760 761 762 | } - (void)of_setPOSIXPermissions: (OFNumber *)permissions ofItemAtURL: (OFURL *)URL attributes: (of_file_attributes_t)attributes OF_DIRECT { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS | | | 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 | } - (void)of_setPOSIXPermissions: (OFNumber *)permissions ofItemAtURL: (OFURL *)URL attributes: (of_file_attributes_t)attributes OF_DIRECT { #ifdef OF_FILE_MANAGER_SUPPORTS_PERMISSIONS mode_t mode = (mode_t)permissions.unsignedLongValue; OFString *path = URL.fileSystemRepresentation; int status; # ifdef OF_WINDOWS if ([OFSystemInfo isWindowsNT]) status = _wchmod(path.UTF16String, mode); else |
︙ | ︙ |