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) |
Modifier and Type | Method and Description |
---|---|
static JRubyFile |
create(String cwd,
String pathname) |
static FileResource |
createResource(jnr.posix.POSIX posix,
Ruby runtime,
String cwd,
String pathname) |
static FileResource |
createResource(jnr.posix.POSIX posix,
String cwd,
String pathname) |
static FileResource |
createResource(Ruby runtime,
String pathname) |
static FileResource |
createResource(ThreadContext context,
String pathname) |
static File |
createTempFile(String prefix,
String suffix) |
static File |
createTempFile(String prefix,
String suffix,
File directory) |
File |
getAbsoluteFile() |
String |
getAbsolutePath() |
File |
getCanonicalFile() |
String |
getCanonicalPath() |
static String |
getFileProperty(String property) |
String |
getParent() |
File |
getParentFile() |
String |
getPath() |
String[] |
list(FilenameFilter filter) |
File[] |
listFiles() |
File[] |
listFiles(FileFilter filter) |
File[] |
listFiles(FilenameFilter filter) |
static File[] |
listRoots() |
static String |
normalizeSeps(String path) |
String |
toString() |
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 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)
listFiles
in class jnr.posix.JavaSecuredFile
Copyright © 2001-2015 JRuby. All Rights Reserved.