99import edu .illinois .library .cantaloupe .util .DeletingFileVisitor ;
1010import edu .illinois .library .cantaloupe .util .StringUtils ;
1111import org .apache .commons .codec .binary .Hex ;
12- import org .apache .commons .lang3 .SystemUtils ;
1312import org .slf4j .Logger ;
1413import org .slf4j .LoggerFactory ;
1514
@@ -288,9 +287,9 @@ public void write(byte[] b, int off, int len) throws IOException {
288287 new ConcurrentHashMap <>();
289288
290289 /**
291- * Returns the last-accessed time of the given file. On some OS/filesystem
292- * combinations, this may be unreliable or not available, in which case the
293- * last-modified time is returned instead .
290+ * Returns the last-accessed time of the given file. On some filesystems,
291+ * particularly those mounted with a {@code noatime} option, this may be
292+ * the same as the last-modified time.
294293 *
295294 * @param file File to check.
296295 * @return Last-accessed time of the given file, if available, or the
@@ -300,12 +299,6 @@ public void write(byte[] b, int off, int len) throws IOException {
300299 */
301300 static FileTime getLastAccessedTime (Path file ) throws IOException {
302301 try {
303- // Last-accessed time is not reliable on macOS+APFS 10.13.2.
304- if (SystemUtils .IS_OS_MAC ) {
305- LOGGER .trace ("macOS detected; using file last-modified " +
306- "instead of last-accessed times." );
307- return Files .getLastModifiedTime (file );
308- }
309302 return (FileTime ) Files .getAttribute (file , "lastAccessTime" );
310303 } catch (UnsupportedOperationException e ) {
311304 LOGGER .error ("getLastAccessedTime(): {}" , e .getMessage (), e );
@@ -974,7 +967,7 @@ public void put(Identifier identifier, String info) throws IOException {
974967
975968 /**
976969 * Sets the age threshold for cleaning files. Cleanable files last
977- * modified less than this many milliseconds ago will not be subject to
970+ * accessed less than this many milliseconds ago will not be subject to
978971 * cleanup.
979972 *
980973 * @param age Age in milliseconds.
0 commit comments