This file acts as an alternative to NormalizedFile, due to the problems with current working directory.
| Modifier and Type | Field and Description |
|---|---|
| public static final JRubyFile | |
| private static final long | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| private | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private JRubyFile[] | |
| public static JRubyFile | |
| private static JRubyFile | |
| public static FileResource | |
| public static FileResource | |
| public static FileResource | |
| private static FileResource | |
| public static FileResource | |
| public static FileResource | |
| public static File | createTempFile(String
The prefix string to be used in generating the file's
name; must be at least three characters long prefix, String The suffix string to be used in generating the file's
name; may be suffix, File null, in which case the
suffix ".tmp" will be usedThe directory in which the file is to be created, or
directory)null if the default temporary-file
directory is to be usedHides java. Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name. |
| public static File | createTempFile(String
The prefix string to be used in generating the file's
name; must be at least three characters long prefix, String The suffix string to be used in generating the file's
name; may be suffix)null, in which case the
suffix ".tmp" will be usedHides java. Creates an empty file in the default temporary-file directory, using the given prefix and suffix to generate its name. |
| public File | getAbsoluteFile()
Overrides jnr. Returns the absolute form of this abstract pathname. |
| public String | getAbsolutePath()
Overrides java. Returns the absolute pathname string of this abstract pathname. |
| public File | getCanonicalFile()
Overrides jnr. Returns the canonical form of this abstract pathname. |
| public String | getCanonicalPath()
Overrides jnr. Returns the canonical pathname string of this abstract pathname. |
| public static String | |
| public String | getParent()
Overrides java. Returns the pathname string of this abstract pathname's parent, or
|
| public File | getParentFile()
Overrides jnr. Returns the abstract pathname of this abstract pathname's parent,
or |
| public String | |
| pack-priv final String | |
| pack-priv static boolean | |
| public static boolean | |
| public String[] | list(FilenameFilter
A filename filter filter)Overrides jnr. Returns an array of strings naming the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. |
| public File[] | listFiles()
Overrides jnr. Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname. |
| public File[] | listFiles(final FileFilter
A file filter filter)Overrides jnr. Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. |
| public File[] | listFiles(final FilenameFilter
A filename filter filter)Overrides java. Returns an array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname that satisfy the specified filter. |
| public static File[] | |
| public static String | |
| public String |
| DUMMY | back to summary |
|---|---|
| public static final JRubyFile DUMMY | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| windowsComPattern | back to summary |
|---|---|
| private static final Pattern windowsComPattern | |
| JRubyFile | back to summary |
|---|---|
| private JRubyFile(File file) | |
| JRubyFile | back to summary |
|---|---|
| public JRubyFile(String filename) | |
| JRubyFile | back to summary |
|---|---|
| public JRubyFile(String parent, String child) | |
| convertFiles | back to summary |
|---|---|
| private JRubyFile[] convertFiles(final File[] files) | |
| create | back to summary |
|---|---|
| public static JRubyFile create(String cwd, String pathname) | |
| createNoUnicodeConversion | back to summary |
|---|---|
| private static JRubyFile createNoUnicodeConversion(String cwd, String pathname, File path) | |
| createResource | back to summary |
|---|---|
| public static FileResource createResource(ThreadContext context, String pathname) | |
| createResource | back to summary |
|---|---|
| public static FileResource createResource(Ruby runtime, String pathname) | |
| createResource | back to summary |
|---|---|
| public static FileResource createResource(Ruby runtime, String cwd, String pathname) | |
| createResource | back to summary |
|---|---|
| private static FileResource createResource(Ruby runtime, String cwd, String pathname, boolean isFile) | |
| createResourceAsFile | back to summary |
|---|---|
| public static FileResource createResourceAsFile(Ruby runtime, String pathname) | |
| createRestrictedResource | back to summary |
|---|---|
| public static FileResource createRestrictedResource(String cwd, String pathname) | |
| createTempFile | back to summary |
|---|---|
| public static File createTempFile(String prefix, String suffix, File directory) throws IOException Hides java. Doc from java. Creates a new empty file in the specified directory, using the given prefix and suffix strings to generate its name. If this method returns successfully then it is guaranteed that:
deleteOnExit method.
The To create the new file, the prefix and the suffix may first be
adjusted to fit the limitations of the underlying platform. If the
prefix is too long then it will be truncated, but its first three
characters will always be preserved. If the suffix is too long then it
too will be truncated, but if it begins with a period character
( If a file with the generated name cannot be created by the
underlying platform, then an If the If the
| |
| createTempFile | back to summary |
|---|---|
| public static File createTempFile(String prefix, String suffix) throws IOException Hides java. Doc from java. Creates an empty file in the default temporary-file directory, using
the given prefix and suffix to generate its name. Invoking this method
is equivalent to invoking The
| |
| getAbsoluteFile | back to summary |
|---|---|
| public File getAbsoluteFile() Overrides jnr. Doc from java. Returns the absolute form of this abstract pathname. Equivalent to
| |
| getAbsolutePath | back to summary |
|---|---|
| public String getAbsolutePath() Overrides java. Doc from java. Returns the absolute pathname string of this abstract pathname. If this abstract pathname is already absolute, then the pathname
string is simply returned as if by the | |
| getCanonicalFile | back to summary |
|---|---|
| public File getCanonicalFile() throws IOException Overrides jnr. Doc from java. Returns the canonical form of this abstract pathname. Equivalent to
| |
| getCanonicalPath | back to summary |
|---|---|
| public String getCanonicalPath() throws IOException Overrides jnr. Doc from java. Returns the canonical pathname string of this abstract pathname. A canonical pathname is both absolute and unique. The precise
definition of canonical form is system-dependent. This method first
converts this pathname to absolute form if necessary, as if by invoking the
Every pathname that denotes an existing file or directory has a unique canonical form. Every pathname that denotes a nonexistent file or directory also has a unique canonical form. The canonical form of the pathname of a nonexistent file or directory may be different from the canonical form of the same pathname after the file or directory is created. Similarly, the canonical form of the pathname of an existing file or directory may be different from the canonical form of the same pathname after the file or directory is deleted.
| |
| getFileProperty | back to summary |
|---|---|
| public static String getFileProperty(String property) | |
| getParent | back to summary |
|---|---|
| public String getParent() Overrides java. Doc from java. Returns the pathname string of this abstract pathname's parent, or
The parent of an abstract pathname consists of the pathname's prefix, if any, and each name in the pathname's name sequence except for the last. If the name sequence is empty then the pathname does not name a parent directory. | |
| getParentFile | back to summary |
|---|---|
| public File getParentFile() Overrides jnr. Doc from java. Returns the abstract pathname of this abstract pathname's parent,
or The parent of an abstract pathname consists of the pathname's prefix, if any, and each name in the pathname's name sequence except for the last. If the name sequence is empty then the pathname does not name a parent directory. | |
| getPath | back to summary |
|---|---|
| public String getPath() Overrides java. Doc from java. Converts this abstract pathname into a pathname string. The resulting
string uses the | |
| getPathDefault | back to summary |
|---|---|
| pack-priv final String getPathDefault() | |
| isComPort | back to summary |
|---|---|
| pack-priv static boolean isComPort(String path) | |
| isResourceRegularFile | back to summary |
|---|---|
| public static boolean isResourceRegularFile(FileResource res) | |
| list | back to summary |
|---|---|
| public String[] list(FilenameFilter filter) Overrides jnr. Doc from java. Returns an array of strings naming the files and directories in the
directory denoted by this abstract pathname that satisfy the specified
filter. The behavior of this method is the same as that of the
| |
| listFiles | back to summary |
|---|---|
| public File[] listFiles() Overrides jnr. Doc from java. Returns an array of abstract pathnames denoting the files in the directory denoted by this abstract pathname. If this abstract pathname does not denote a directory, then this
method returns There is no guarantee that the name strings in the resulting array will appear in any specific order; they are not, in particular, guaranteed to appear in alphabetical order. Note that the | |
| listFiles | back to summary |
|---|---|
| public File[] listFiles(final FileFilter filter) Overrides jnr. Doc from java. Returns an array of abstract pathnames denoting the files and
directories in the directory denoted by this abstract pathname that
satisfy the specified filter. The behavior of this method is the same
as that of the
| |
| listFiles | back to summary |
|---|---|
| public File[] listFiles(final FilenameFilter filter) Overrides java. Doc from java. Returns an array of abstract pathnames denoting the files and
directories in the directory denoted by this abstract pathname that
satisfy the specified filter. The behavior of this method is the same
as that of the
| |
| listRoots | back to summary |
|---|---|
| public static File[] listRoots() Hides java. Doc from java. List the available filesystem roots. A particular Java platform may support zero or more
hierarchically-organized file systems. Each file system has a
This method returns an array of
| |
| normalizeSeps | back to summary |
|---|---|
| public static String normalizeSeps(String path) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns the pathname string of this abstract pathname. This is just the
string returned by the | |