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 JRubyFilestatic FileResourcecreateResource(Ruby runtime, String pathname) static FileResourcecreateResource(Ruby runtime, String cwd, String pathname) static FileResourcecreateResource(ThreadContext context, String pathname) static FileResourcecreateResourceAsFile(Ruby runtime, String pathname) static FileResourcecreateRestrictedResource(String cwd, String pathname) static FilecreateTempFile(String prefix, String suffix) static FilecreateTempFile(String prefix, String suffix, File directory) static StringgetFileProperty(String property) getPath()static booleanString[]list(FilenameFilter filter) File[]File[]listFiles(FileFilter filter) File[]listFiles(FilenameFilter filter) static File[]static StringnormalizeSeps(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, setReadOnlyMethods 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:
getAbsolutePathin classFile
-
getCanonicalPath
- Overrides:
getCanonicalPathin classjnr.posix.JavaSecuredFile- Throws:
IOException
-
getPath
-
toString
-
getAbsoluteFile
- Overrides:
getAbsoluteFilein classjnr.posix.JavaSecuredFile
-
getCanonicalFile
- Overrides:
getCanonicalFilein classjnr.posix.JavaSecuredFile- Throws:
IOException
-
getParent
-
getParentFile
- Overrides:
getParentFilein classjnr.posix.JavaSecuredFile
-
listRoots
-
createTempFile
- Throws:
IOException
-
createTempFile
- Throws:
IOException
-
list
- Overrides:
listin classjnr.posix.JavaSecuredFile
-
listFiles
- Overrides:
listFilesin classjnr.posix.JavaSecuredFile
-
listFiles
- Overrides:
listFilesin classjnr.posix.JavaSecuredFile
-
listFiles
-