br.com.objectos.fs
| Modifier and Type | Method and Description |
|---|---|
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. |
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 instanceNotFoundException - if the pathname does not existNotDirectoryException - 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 pathnameNotFoundException - if the pathname does not existNotDirectoryException - 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 resourceNotFoundException - if the pathname does not existNotRegularFileException - 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 pathnameNotFoundException - if the pathname does not existNotRegularFileException - 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 instanceNotFoundException - if the pathname does not existNotRegularFileException - 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 convertResolvedPathpublic 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 pathnameResolvedPathpublic static ResolvedPath resolve(URI uri)
ResolvedPath by converting a java.net.URI.uri - the java.net.URI to convertResolvedPathCopyright © 2021–2022 Objectos Software LTDA. All rights reserved.