Tabnine Logo
File.isInvalid
Code IndexAdd Tabnine to your IDE (free)

How to use
isInvalid
method
in
java.io.File

Best Java code snippets using java.io.File.isInvalid (Showing top 20 results out of 315)

origin: com.jtransc/jtransc-rt

public boolean renameTo(File dest) {
  if (dest == null) throw new NullPointerException();
  if (this.isInvalid() || dest.isInvalid()) return false;
  return fs.rename(this, dest);
}
origin: com.jtransc/jtransc-rt

public boolean setWritable(boolean writable, boolean ownerOnly) {
  if (isInvalid()) return false;
  return fs.setPermission(this, FileSystem.ACCESS_WRITE, writable, ownerOnly);
}
origin: com.jtransc/jtransc-rt

public boolean canExecute() {
  if (isInvalid()) return false;
  return fs.checkAccess(this, FileSystem.ACCESS_EXECUTE);
}
origin: com.jtransc/jtransc-rt

public boolean canWrite() {
  if (isInvalid()) return false;
  return fs.checkAccess(this, FileSystem.ACCESS_WRITE);
}
origin: com.jtransc/jtransc-rt

public boolean isFile() {
  if (isInvalid()) return false;
  return ((fs.getBooleanAttributes(this) & FileSystem.BA_REGULAR) != 0);
}
origin: com.jtransc/jtransc-rt

public String[] list() {
  if (isInvalid()) return null;
  return fs.list(this);
}
origin: com.jtransc/jtransc-rt

public boolean canRead() {
  if (isInvalid()) return false;
  return fs.checkAccess(this, FileSystem.ACCESS_READ);
}
origin: com.jtransc/jtransc-rt

public long length() {
  if (isInvalid()) return 0L;
  return fs.getLength(this);
}
origin: com.jtransc/jtransc-rt

public boolean delete() {
  if (isInvalid()) return false;
  return fs.delete(this);
}
origin: com.jtransc/jtransc-rt

public boolean setReadOnly() {
  if (isInvalid()) return false;
  return fs.setReadOnly(this);
}
origin: com.jtransc/jtransc-rt

public boolean setExecutable(boolean executable, boolean ownerOnly) {
  if (isInvalid()) return false;
  return fs.setPermission(this, FileSystem.ACCESS_EXECUTE, executable, ownerOnly);
}
origin: com.jtransc/jtransc-rt

@Deprecated
public URL toURL() throws MalformedURLException {
  if (isInvalid()) throw new MalformedURLException("Invalid file path");
  return new URL("file", "", slashify(getAbsolutePath(), isDirectory()));
}
origin: com.jtransc/jtransc-rt

public boolean setLastModified(long time) {
  if (time < 0) throw new IllegalArgumentException("Negative time");
  if (isInvalid()) return false;
  return fs.setLastModifiedTime(this, time);
}
origin: com.jtransc/jtransc-rt

public boolean isHidden() {
  if (isInvalid()) return false;
  return ((fs.getBooleanAttributes(this) & FileSystem.BA_HIDDEN) != 0);
}
origin: com.jtransc/jtransc-rt

public boolean setReadable(boolean readable, boolean ownerOnly) {
  if (isInvalid()) return false;
  return fs.setPermission(this, FileSystem.ACCESS_READ, readable, ownerOnly);
}
origin: com.jtransc/jtransc-rt

public long getFreeSpace() {
  if (isInvalid()) return 0L;
  return fs.getSpace(this, FileSystem.SPACE_FREE);
}
origin: com.jtransc/jtransc-rt

public long getUsableSpace() {
  if (isInvalid()) return 0L;
  return fs.getSpace(this, FileSystem.SPACE_USABLE);
}
origin: com.jtransc/jtransc-rt

public boolean mkdir() {
  if (isInvalid()) return false;
  return fs.createDirectory(this);
}
origin: com.jtransc/jtransc-rt

public String getCanonicalPath() throws IOException {
  if (isInvalid()) throw new IOException("Invalid file path");
  return fs.canonicalize(fs.resolve(this));
}
origin: com.jtransc/jtransc-rt

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());
  }
}
java.ioFileisInvalid

Popular methods of File

  • <init>
    Creates a new File instance by converting the givenfile: URI into an abstract pathname. The exact fo
  • exists
    Tests whether the file or directory denoted by this abstract pathname exists.
  • getAbsolutePath
    Returns the absolute pathname string of this abstract pathname. If this abstract pathname is already
  • getName
    Returns the name of the file or directory denoted by this abstract pathname. This is just the last n
  • isDirectory
  • mkdirs
  • delete
    Deletes the file or directory denoted by this abstract pathname. If this pathname denotes a director
  • listFiles
    Returns an array of abstract pathnames denoting the files and directories in the directory denoted b
  • getParentFile
    Returns the abstract pathname of this abstract pathname's parent, or null if this pathname does not
  • getPath
    Converts this abstract pathname into a pathname string. The resulting string uses the #separator to
  • isFile
  • length
    Returns the length of the file denoted by this abstract pathname. The return value is unspecified if
  • isFile,
  • length,
  • toURI,
  • createTempFile,
  • createNewFile,
  • toPath,
  • mkdir,
  • lastModified,
  • toString,
  • getCanonicalPath

Popular in Java

  • Start an intent from android
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • getSharedPreferences (Context)
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now