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(Ruby runtime,
String pathname) |
static FileResource |
createResource(Ruby runtime,
String cwd,
String pathname) |
static FileResource |
createResource(ThreadContext context,
String pathname) |
static FileResource |
createResourceAsFile(Ruby runtime,
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, setReadOnlycanExecute, compareTo, deleteOnExit, equals, getFreeSpace, getName, getTotalSpace, getUsableSpace, hashCode, isAbsolute, setExecutable, setExecutable, setReadable, setReadable, setWritable, setWritable, toPath, toURI, toURLprotected JRubyFile(String filename)
public static FileResource createResource(ThreadContext context, String pathname)
public static FileResource createResourceAsFile(Ruby runtime, String pathname)
public static FileResource createResource(Ruby runtime, String pathname)
public static FileResource createResource(Ruby runtime, String cwd, String pathname)
public String getAbsolutePath()
getAbsolutePath in class Filepublic String getCanonicalPath() throws IOException
getCanonicalPath in class jnr.posix.JavaSecuredFileIOExceptionpublic File getAbsoluteFile()
getAbsoluteFile in class jnr.posix.JavaSecuredFilepublic File getCanonicalFile() throws IOException
getCanonicalFile in class jnr.posix.JavaSecuredFileIOExceptionpublic File getParentFile()
getParentFile in class jnr.posix.JavaSecuredFilepublic static File[] listRoots()
public static File createTempFile(String prefix, String suffix, File directory) throws IOException
IOExceptionpublic static File createTempFile(String prefix, String suffix) throws IOException
IOExceptionpublic String[] list(FilenameFilter filter)
list in class jnr.posix.JavaSecuredFilepublic File[] listFiles()
listFiles in class jnr.posix.JavaSecuredFilepublic File[] listFiles(FileFilter filter)
listFiles in class jnr.posix.JavaSecuredFilepublic File[] listFiles(FilenameFilter filter)
Copyright © 2001-2015 JRuby. All Rights Reserved.