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 File
createTempFile
(String prefix, String suffix) static File
createTempFile
(String prefix, String suffix, File directory) static String
getFileProperty
(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, 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
-
Constructor Details
-
NormalizedFile
-
NormalizedFile
-
NormalizedFile
-
NormalizedFile
-
-
Method Details
-
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
-
list
- Overrides:
list
in classjnr.posix.JavaSecuredFile
-
listFiles
- Overrides:
listFiles
in classjnr.posix.JavaSecuredFile
-
listFiles
- Overrides:
listFiles
in classjnr.posix.JavaSecuredFile
-
listFiles
-
getFileProperty
-