Package org.jruby.util
Class JRubyFile
java.lang.Object
java.io.File
jnr.posix.JavaSecuredFile
org.jruby.util.JRubyFile
- All Implemented Interfaces:
Serializable
,Comparable<File>
- Direct Known Subclasses:
JRubyNonExistentFile
public class JRubyFile
extends jnr.posix.JavaSecuredFile
This file acts as an alternative to NormalizedFile, due to the problems with current working directory.
- See Also:
-
Field Summary
FieldsFields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JRubyFile
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 FileResource
createRestrictedResource
(String cwd, String pathname) static File
createTempFile
(String prefix, String suffix) static File
createTempFile
(String prefix, String suffix, File directory) static String
getFileProperty
(String property) getPath()
static boolean
String[]
list
(FilenameFilter filter) File[]
File[]
listFiles
(FileFilter filter) File[]
listFiles
(FilenameFilter filter) static File[]
static String
normalizeSeps
(String path) toString()
Methods inherited from class jnr.posix.JavaSecuredFile
canRead, canWrite, createNewFile, delete, exists, isDirectory, isFile, isHidden, lastModified, length, list, mkdir, mkdirs, renameTo, setLastModified, setReadOnly
Methods inherited from class java.io.File
canExecute, compareTo, deleteOnExit, equals, getFreeSpace, getName, getTotalSpace, getUsableSpace, hashCode, isAbsolute, setExecutable, setExecutable, setReadable, setReadable, setWritable, setWritable, toPath, toURI, toURL
-
Field Details
-
DUMMY
-
-
Constructor Details
-
JRubyFile
-
JRubyFile
-
-
Method Details
-
create
-
createResource
-
createResourceAsFile
-
createRestrictedResource
-
createResource
-
createResource
-
isResourceRegularFile
-
normalizeSeps
-
getFileProperty
-
getAbsolutePath
- Overrides:
getAbsolutePath
in classFile
-
getCanonicalPath
- Overrides:
getCanonicalPath
in classjnr.posix.JavaSecuredFile
- Throws:
IOException
-
getPath
-
toString
-
getAbsoluteFile
- Overrides:
getAbsoluteFile
in classjnr.posix.JavaSecuredFile
-
getCanonicalFile
- Overrides:
getCanonicalFile
in classjnr.posix.JavaSecuredFile
- Throws:
IOException
-
getParent
-
getParentFile
- Overrides:
getParentFile
in classjnr.posix.JavaSecuredFile
-
listRoots
-
createTempFile
- Throws:
IOException
-
createTempFile
- Throws:
IOException
-
list
- Overrides:
list
in classjnr.posix.JavaSecuredFile
-
listFiles
- Overrides:
listFiles
in classjnr.posix.JavaSecuredFile
-
listFiles
- Overrides:
listFiles
in classjnr.posix.JavaSecuredFile
-
listFiles
-