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, 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 createRestrictedResource(String cwd, 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.