public boolean setWritable(boolean writable, boolean ownerOnly) { if (isInvalid()) return false; return fs.setPermission(this, FileSystem.ACCESS_WRITE, writable, ownerOnly); }
public boolean canExecute() { if (isInvalid()) return false; return fs.checkAccess(this, FileSystem.ACCESS_EXECUTE); }
public boolean canWrite() { if (isInvalid()) return false; return fs.checkAccess(this, FileSystem.ACCESS_WRITE); }
public boolean isFile() { if (isInvalid()) return false; return ((fs.getBooleanAttributes(this) & FileSystem.BA_REGULAR) != 0); }
public String[] list() { if (isInvalid()) return null; return fs.list(this); }
public boolean canRead() { if (isInvalid()) return false; return fs.checkAccess(this, FileSystem.ACCESS_READ); }
public long length() { if (isInvalid()) return 0L; return fs.getLength(this); }
public boolean delete() { if (isInvalid()) return false; return fs.delete(this); }
public boolean setReadOnly() { if (isInvalid()) return false; return fs.setReadOnly(this); }
public boolean setExecutable(boolean executable, boolean ownerOnly) { if (isInvalid()) return false; return fs.setPermission(this, FileSystem.ACCESS_EXECUTE, executable, ownerOnly); }
@Deprecated public URL toURL() throws MalformedURLException { if (isInvalid()) throw new MalformedURLException("Invalid file path"); return new URL("file", "", slashify(getAbsolutePath(), isDirectory())); }
public boolean setLastModified(long time) { if (time < 0) throw new IllegalArgumentException("Negative time"); if (isInvalid()) return false; return fs.setLastModifiedTime(this, time); }
public boolean isHidden() { if (isInvalid()) return false; return ((fs.getBooleanAttributes(this) & FileSystem.BA_HIDDEN) != 0); }
public boolean setReadable(boolean readable, boolean ownerOnly) { if (isInvalid()) return false; return fs.setPermission(this, FileSystem.ACCESS_READ, readable, ownerOnly); }
public long getFreeSpace() { if (isInvalid()) return 0L; return fs.getSpace(this, FileSystem.SPACE_FREE); }
public long getUsableSpace() { if (isInvalid()) return 0L; return fs.getSpace(this, FileSystem.SPACE_USABLE); }
public boolean mkdir() { if (isInvalid()) return false; return fs.createDirectory(this); }
public String getCanonicalPath() throws IOException { if (isInvalid()) throw new IOException("Invalid file path"); return fs.canonicalize(fs.resolve(this)); }
public FileOutputStream(File file, boolean append) throws FileNotFoundException { String name = (file != null ? file.getPath() : null); if (name == null) throw new NullPointerException(); if (file.isInvalid()) throw new FileNotFoundException("Invalid file path"); this.fd = new FileDescriptor(); this.append = append; this.path = name; jfd = JTranscSyncIO.impl.open(name, JTranscSyncIO.O_RDWR); if (append) { jfd.setPosition(jfd.getLength()); } }