|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectbr.com.objectos.fs.LocalFs
public final class LocalFs
Provides static methods for obtaining PathName instances,
such as directories and files, from the local file system. The local file
system is the one accessible to the Java virtual machine process.
| Method Summary | |
|---|---|
static Directory |
getDirectory(File file)
Returns an existing directory whose pathname is given by the specified java.io.File. |
static Directory |
getDirectory(String first,
String... more)
Returns an existing directory whose pathname is given by combining all of the specified names. |
static RegularFile |
getRegularFile(Resource resource)
Returns an existing file given by the specified ClassLoader
resource. |
static RegularFile |
getRegularFile(String first,
String... more)
Returns an existing file whose pathname is given by combining all of the specified names. |
static RegularFile |
getRegularFile(URI uri)
Returns an existing file whose pathname is given by the specified java.net.URI. |
static ResolvedPath |
resolve(File file)
Returns a ResolvedPath by converting a java.io.File. |
static ResolvedPath |
resolve(String first,
String... more)
Returns a ResolvedPath whose pathname is given by combining all of
the specified names. |
static ResolvedPath |
resolve(URI uri)
Returns a ResolvedPath by converting a java.net.URI. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Directory getDirectory(File file)
throws NotFoundException,
NotDirectoryException,
IOException
java.io.File.
This is a convenience method for which the implementation is equivalent to:
ResolvedPath path = LocalFs.resolve(file);
return path.toDirectory();
file - the java.io.File instance
NotFoundException - if the pathname does not exist
NotDirectoryException - if the pathname exists but it is not a directory (is a regular file
for instance)
IOException - if an I/O error occursResolvedPath.toDirectory()
public static Directory getDirectory(String first,
String... more)
throws NotFoundException,
NotDirectoryException,
IOException
This is a convenience method for which the implementation is equivalent to:
ResolvedPath path = LocalFs.resolve(first, more);
return path.toDirectory();
first - the first part of the pathnamemore - the remaining parts of the pathname
NotFoundException - if the pathname does not exist
NotDirectoryException - if the pathname exists but it is not a directory (is a regular file
for instance)
IOException - if an I/O error occursResolvedPath.toDirectory()
public static RegularFile getRegularFile(Resource resource)
throws NotFoundException,
NotRegularFileException,
IOException
ClassLoader
resource.
This is a convenience method for which the implementation is equivalent to:
URI uri = resource.toUri();
ResolvedPath path = LocalFs.resolve(uri);
return path.toRegularFile();
resource - a class loader resource
NotFoundException - if the pathname does not exist
NotRegularFileException - if the pathname exists but it is not a file (is a directory for
instance)
IOException - if an I/O error occursResolvedPath.toRegularFile()
public static RegularFile getRegularFile(String first,
String... more)
throws NotFoundException,
NotRegularFileException,
IOException
This is a convenience method for which the implementation is equivalent to:
ResolvedPath path = LocalFs.resolve(first, more);
return path.toRegularFile();
first - the first part of the pathnamemore - the remaining parts of the pathname
NotFoundException - if the pathname does not exist
NotRegularFileException - if the pathname exists but it is not a file (is a directory for
instance)
IOException - if an I/O error occursResolvedPath.toRegularFile()
public static RegularFile getRegularFile(URI uri)
throws NotFoundException,
NotRegularFileException,
IOException
java.net.URI.
This is a convenience method for which the implementation is equivalent to:
ResolvedPath path = LocalFs.resolve(uri);
return path.toRegularFile();
uri - the java.net.URI instance
NotFoundException - if the pathname does not exist
NotRegularFileException - if the pathname exists but it is not a file (is a directory for
instance)
IOException - if an I/O error occursResolvedPath.toRegularFile()public static ResolvedPath resolve(File file)
ResolvedPath by converting a java.io.File.
file - the java.io.File to convert
ResolvedPath
public static ResolvedPath resolve(String first,
String... more)
ResolvedPath whose pathname is given by combining all of
the specified names.
All of the specified names are combined together, in a system dependant
manner, resulting in a pathname. This pathname is used to create the
ResolvedPath instance.
first - the first part of the pathnamemore - the remaining parts of the pathname
ResolvedPathpublic static ResolvedPath resolve(URI uri)
ResolvedPath by converting a java.net.URI.
uri - the java.net.URI to convert
ResolvedPath
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||