Modifier and Type | Method and Description |
---|---|
static Path |
asPath(File file)
Converts a
File into a Path object. |
static Path |
asPath(String path)
Parses a string representing a path into a
Path object. |
static Path[] |
asPaths(File[] files)
Converts an array of files into an array of paths.
|
static List<Path> |
asPaths(List<String> paths)
Parses a string list representing a path into a list of
Path 's. |
static List<Path> |
extractPaths(List<PathDetails> details)
Convert a list of
PathDetails objects to a list
of Path objects. |
static List<Path> |
extractPaths(List<PathDetails> details,
boolean includeHidden)
Convert a list of
PathDetails objects to a list
of Path objects. |
static Map<String,FileConfiguration> |
getDefaultConfiguration()
Collects the default configuration for all installed providers.
|
static File |
getIndexFile(Path path)
Returns the index file associated with a temporary file path.
|
static FileSystemProvider |
getProvider(String path)
Locates the provider identified by the scheme of
the specified path string.
|
public static Path asPath(String path)
Path
object.path
- a string representation of a pathIllegalArgumentException
- if the provided
string does not represent a supported path syntaxDRException
- if no configured provider could be found
for the schemepublic static List<Path> asPaths(List<String> paths)
Path
's.paths
- a list of string pathsIllegalArgumentException
- if the provided
strings do not represent a supported path syntaxDRException
- if no configured provider could be found
for the schemepublic static Path asPath(File file)
File
into a Path
object.
This method provides a bridge between the java.io
package and DataRush.file
- the file located by the pathpublic static Path[] asPaths(File[] files)
files
- the array of filespublic static File getIndexFile(Path path)
path
- a temporary pathClassCastException
- if the provided path is not a temporary pathpublic static FileSystemProvider getProvider(String path)
path
- the string representation of a path
for which to find the configured provider. Only
a schema prefix is required; additional scheme-specific
information is ignored.DRException
- if no configured provider could be found
for the schemepublic static Map<String,FileConfiguration> getDefaultConfiguration()
This method does not generally need to be called by end users.
FileMetaConfiguration
objects will automatically add default
configuration when created.
FileSystemProvider.getDefaultConfiguration()
public static List<Path> extractPaths(List<PathDetails> details)
PathDetails
objects to a list
of Path
objects. Will not include hidden objects.details
- a list of file system object metadatapublic static List<Path> extractPaths(List<PathDetails> details, boolean includeHidden)
PathDetails
objects to a list
of Path
objects.details
- a list of file system object metadataincludeHidden
- whether hidden files should be included in the listCopyright © 2016 Actian Corporation. All rights reserved.