Overview
Context
Changes
Modified src/OFFile.h
from [ea93239d94]
to [7f83bdcf57].
︙ | | |
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
|
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
|
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
|
* @brief Returns the size of the specified file.
*
* @return The size of the specified file
*/
+ (of_offset_t)sizeOfFileAtPath: (OFString*)path;
/*!
* @brief Returns the date of the last modification of the file.
* @brief Returns the last access time of the specified file.
*
* @return The last access time of the specified file
*/
+ (OFDate*)accessTimeOfItemAtPath: (OFString*)path;
/*!
* @brief Returns the last modification time of the specified file.
*
* @return The date of the last modification of the file
* @return The last modification time of the specified file
*/
+ (OFDate*)modificationTimeOfItemAtPath: (OFString*)path;
/*!
* @brief Returns the last status change time of the specified file.
*
* @return The last status change time of the specified file
*/
+ (OFDate*)modificationDateOfFileAtPath: (OFString*)path;
+ (OFDate*)statusChangeTimeOfItemAtPath: (OFString*)path;
#ifdef OF_HAVE_CHMOD
/*!
* @brief Changes the permissions of an item.
*
* This method only changes the read-only flag on Windows.
*
|
︙ | | |
Modified src/OFFile.m
from [804562284b]
to [2b8886285e].
︙ | | |
529
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
|
529
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
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
|
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
|
@throw [OFOpenFileFailedException exceptionWithPath: path
mode: @"r"
errNo: errno];
return s.st_size;
}
+ (OFDate*)modificationDateOfFileAtPath: (OFString*)path
+ (OFDate*)accessTimeOfItemAtPath: (OFString*)path
{
of_stat_t s;
if (path == nil)
@throw [OFInvalidArgumentException exception];
if (of_stat(path, &s) != 0)
/* FIXME: Maybe use another exception? */
@throw [OFOpenFileFailedException exceptionWithPath: path
mode: @"r"
errNo: errno];
/* FIXME: We could be more precise on some OSes */
return [OFDate dateWithTimeIntervalSince1970: s.st_atime];
}
+ (OFDate*)modificationTimeOfItemAtPath: (OFString*)path
{
of_stat_t s;
if (path == nil)
@throw [OFInvalidArgumentException exception];
if (of_stat(path, &s) != 0)
/* FIXME: Maybe use another exception? */
@throw [OFOpenFileFailedException exceptionWithPath: path
mode: @"r"
errNo: errno];
/* FIXME: We could be more precise on some OSes */
return [OFDate dateWithTimeIntervalSince1970: s.st_mtime];
}
+ (OFDate*)statusChangeTimeOfItemAtPath: (OFString*)path
{
of_stat_t s;
if (path == nil)
@throw [OFInvalidArgumentException exception];
if (of_stat(path, &s) != 0)
/* FIXME: Maybe use another exception? */
@throw [OFOpenFileFailedException exceptionWithPath: path
mode: @"r"
errNo: errno];
/* FIXME: We could be more precise on some OSes */
return [OFDate dateWithTimeIntervalSince1970: s.st_ctime];
}
#ifdef OF_HAVE_CHMOD
+ (void)changePermissionsOfItemAtPath: (OFString*)path
permissions: (mode_t)permissions
{
if (path == nil)
@throw [OFInvalidArgumentException exception];
|
︙ | | |