Differences From Artifact [469f3d6619]:
- File
src/OFFileURLHandler.m
— part of check-in
[d74f244ab7]
at
2020-08-12 20:56:32
on branch trunk
— Avoid using (u)intmax_t in methods
It is not guaranteed that a type encoding for it exists. (user: js, size: 36606) [annotate] [blame] [check-ins using]
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]; |
︙ | ︙ | |||
621 622 623 624 625 626 627 | @throw [OFOutOfRangeException exception]; [ret setObject: [NSNumber numberWithUnsignedLongLong: s.st_size] forKey: of_file_attribute_key_size]; setTypeAttribute(ret, &s); | | | 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 | @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 |
︙ | ︙ |