/** * Get the file attributes we care for. * * @param path * a {@link java.io.File} object. * @return the file attributes we care for. * @since 3.3 */ public Attributes getAttributes(File path) { boolean isDirectory = isDirectory(path); boolean isFile = !isDirectory && path.isFile(); assert path.exists() == isDirectory || isFile; boolean exists = isDirectory || isFile; boolean canExecute = exists && !isDirectory && canExecute(path); boolean isSymlink = false; long lastModified = exists ? path.lastModified() : 0L; long createTime = 0L; return new Attributes(this, path, exists, isDirectory, canExecute, isSymlink, isFile, createTime, lastModified, -1); }
if (!fs.canExecute(tmpFile)) fs.setExecute(tmpFile, true); } else { if (fs.canExecute(tmpFile)) fs.setExecute(tmpFile, false);
final boolean on = getFS().canExecute(tmp); final boolean off = getFS().canExecute(tmp); FileUtils.delete(tmp);
/** * @param path * @return the file attributes we care for * @since 3.3 */ public Attributes getAttributes(File path) { boolean isDirectory = isDirectory(path); boolean isFile = !isDirectory && path.isFile(); assert path.exists() == isDirectory || isFile; boolean exists = isDirectory || isFile; boolean canExecute = exists && !isDirectory && canExecute(path); boolean isSymlink = false; long lastModified = exists ? path.lastModified() : 0L; long createTime = 0L; return new Attributes(this, path, exists, isDirectory, canExecute, isSymlink, isFile, createTime, lastModified, -1); }
/** * Get the file attributes we care for. * * @param path * a {@link java.io.File} object. * @return the file attributes we care for. * @since 3.3 */ public Attributes getAttributes(File path) { boolean isDirectory = isDirectory(path); boolean isFile = !isDirectory && path.isFile(); assert path.exists() == isDirectory || isFile; boolean exists = isDirectory || isFile; boolean canExecute = exists && !isDirectory && canExecute(path); boolean isSymlink = false; long lastModified = exists ? path.lastModified() : 0L; long createTime = 0L; return new Attributes(this, path, exists, isDirectory, canExecute, isSymlink, isFile, createTime, lastModified, -1); }
if (!fs.canExecute(tmpFile)) fs.setExecute(tmpFile, true); } else { if (fs.canExecute(tmpFile)) fs.setExecute(tmpFile, false);
if (!fs.canExecute(tmpFile)) fs.setExecute(tmpFile, true); } else { if (fs.canExecute(tmpFile)) fs.setExecute(tmpFile, false);
final boolean on = getFS().canExecute(tmp); final boolean off = getFS().canExecute(tmp); FileUtils.delete(tmp);
final boolean on = getFS().canExecute(tmp); final boolean off = getFS().canExecute(tmp); FileUtils.delete(tmp);