public class JRubyFile
extends jnr.posix.JavaSecuredFile
This file acts as an alternative to NormalizedFile, due to the problems with current working directory.
pathSeparator, pathSeparatorChar, separator, separatorChar
Modifier | Constructor and Description |
---|---|
protected |
JRubyFile(String filename) |
canRead, canWrite, createNewFile, delete, exists, isDirectory, isFile, isHidden, lastModified, length, list, mkdir, mkdirs, renameTo, setLastModified, setReadOnly
canExecute, compareTo, deleteOnExit, equals, getFreeSpace, getName, getTotalSpace, getUsableSpace, hashCode, isAbsolute, setExecutable, setExecutable, setReadable, setReadable, setWritable, setWritable, toPath, toURI, toURL
protected JRubyFile(String filename)
public static FileResource createResource(ThreadContext context, String pathname)
public static FileResource createRestrictedResource(String cwd, String pathname)
public static FileResource createResource(Ruby runtime, String pathname)
public static FileResource createResource(jnr.posix.POSIX posix, String cwd, String pathname)
public static FileResource createResource(jnr.posix.POSIX posix, Ruby runtime, String cwd, String pathname)
public String getAbsolutePath()
getAbsolutePath
in class File
public String getCanonicalPath() throws IOException
getCanonicalPath
in class jnr.posix.JavaSecuredFile
IOException
public File getAbsoluteFile()
getAbsoluteFile
in class jnr.posix.JavaSecuredFile
public File getCanonicalFile() throws IOException
getCanonicalFile
in class jnr.posix.JavaSecuredFile
IOException
public File getParentFile()
getParentFile
in class jnr.posix.JavaSecuredFile
public static File[] listRoots()
public static File createTempFile(String prefix, String suffix, File directory) throws IOException
IOException
public static File createTempFile(String prefix, String suffix) throws IOException
IOException
public String[] list(FilenameFilter filter)
list
in class jnr.posix.JavaSecuredFile
public File[] listFiles()
listFiles
in class jnr.posix.JavaSecuredFile
public File[] listFiles(FileFilter filter)
listFiles
in class jnr.posix.JavaSecuredFile
public File[] listFiles(FilenameFilter filter)
Copyright © 2001-2017 JRuby. All Rights Reserved.