Package org.jruby.util
Class NormalizedFile
java.lang.Object
java.io.File
jnr.posix.JavaSecuredFile
org.jruby.util.NormalizedFile
- All Implemented Interfaces:
Serializable,Comparable<File>
public class NormalizedFile
extends jnr.posix.JavaSecuredFile
This class provides a File implementation that normalizes all path separators to forward slashes.
This mimics the behavior of C Ruby, where all paths are internally made UNIX-style, even on Windows.
- See Also:
-
Field Summary
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar -
Constructor Summary
ConstructorsConstructorDescriptionNormalizedFile(File parent, String child) NormalizedFile(String pathname) NormalizedFile(String parent, String child) NormalizedFile(URI uri) -
Method Summary
Modifier and TypeMethodDescriptionstatic FilecreateTempFile(String prefix, String suffix) static FilecreateTempFile(String prefix, String suffix, File directory) static StringgetFileProperty(String property) getPath()String[]list()String[]list(FilenameFilter filter) File[]File[]listFiles(FileFilter filter) File[]listFiles(FilenameFilter filter) static File[]toString()Methods inherited from class jnr.posix.JavaSecuredFile
canRead, canWrite, createNewFile, delete, exists, isDirectory, isFile, isHidden, lastModified, length, 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
-
Constructor Details
-
NormalizedFile
-
NormalizedFile
-
NormalizedFile
-
NormalizedFile
-
-
Method Details
-
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
-
list
- Overrides:
listin classjnr.posix.JavaSecuredFile
-
listFiles
- Overrides:
listFilesin classjnr.posix.JavaSecuredFile
-
listFiles
- Overrides:
listFilesin classjnr.posix.JavaSecuredFile
-
listFiles
-
getFileProperty
-