607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
|
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
|
-
+
+
+
+
+
+
+
+
|
return ret;
}
- (void)of_setLastAccessDate: (OFDate *)lastAccessDate
andModificationDate: (OFDate *)modificationDate
ofItemAtURL: (OFURL *)URL
attributeKey: (of_file_attribute_key_t)attributeKey
attributes: (of_file_attributes_t)attributes
{
OFString *path = URL.fileSystemRepresentation;
of_file_attribute_key_t attributeKey = (modificationDate != nil
? of_file_attribute_key_modification_date
: of_file_attribute_key_last_access_date);
if (lastAccessDate == nil)
lastAccessDate = modificationDate;
if (modificationDate == nil)
modificationDate = lastAccessDate;
#ifdef OF_WINDOWS
if (func__wutime64 != NULL) {
struct __utimbuf64 times = {
.actime =
(__time64_t)lastAccessDate.timeIntervalSince1970,
.modtime =
|
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
|
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
|
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
|
}
lastAccessDate = [attributes
objectForKey: of_file_attribute_key_last_access_date];
modificationDate = [attributes
objectForKey: of_file_attribute_key_modification_date];
if (lastAccessDate != nil || modificationDate != nil) {
if (lastAccessDate != nil || modificationDate != nil)
of_file_attribute_key_t attributeKey;
if (modificationDate != nil)
attributeKey = of_file_attribute_key_modification_date;
else
attributeKey = of_file_attribute_key_last_access_date;
if (lastAccessDate == nil)
lastAccessDate = modificationDate;
if (modificationDate == nil)
modificationDate = lastAccessDate;
[self of_setLastAccessDate: lastAccessDate
andModificationDate: modificationDate
ofItemAtURL: URL
attributeKey: attributeKey
attributes: attributes];
}
objc_autoreleasePoolPop(pool);
}
- (bool)fileExistsAtURL: (OFURL *)URL
{
void *pool = objc_autoreleasePoolPush();
|