APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.tools.javac.file

public Class FSInfo

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.tools.javac.file.CacheFSInfo
Imports
java.io.IOException, java.net.MalformedURLException, .URI, .URISyntaxException, .URL, java.nio.file.Files, .Path, java.nio.file.spi.FileSystemProvider, java.util.ArrayList, .Collections, .HashMap, .List, .Map, .StringTokenizer, java.util.jar.Attributes, .JarFile, .Manifest, com.sun.tools.javac.util.Context

Get meta-info about files. Default direct (non-caching) implementation.
See Also
<p><b>This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.</b>

Field Summary

Modifier and TypeField and Description
private FileSystemProvider
private static final Map<String, String>

Constructor Summary

AccessConstructor and Description
protected
protected
FSInfo(Context context)

Method Summary

Modifier and TypeMethod and Description
public boolean
exists(Path file)

public Path
public List<Path>
public synchronized FileSystemProvider
public static FSInfo

Returns:

the Paths instance for this context
instance
(Context
the context
context
)

Get the FSInfo instance for this context.

public boolean
public boolean
isFile(Path file)

public Map<String, ?>
readOnlyJarFSEnv(String
the release version to use when creating a file-system from a multi-release JAR (or null to ignore release versioning).
releaseVersion
)

Returns a FileSystem environment map suitable for creating read-only JAR file-systems with default timestamp information via FileSystemProvider#newFileSystem(Path, Map) or java.nio.file.FileSystems#newFileSystem(Path, Map).

pack-priv static URL

Returns:

the resolved URL or null if the input is an absolute URL with a scheme other than file (ignoring case)
tryResolveFile
(URL base, String input)

Attempt to return a file URL by resolving input against a base file URL.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

jarFSProviderback to summary
private FileSystemProvider jarFSProvider
READ_ONLY_JARFS_ENVback to summary
private static final Map<String, String> READ_ONLY_JARFS_ENV

Constructor Detail

FSInfoback to summary
protected FSInfo()
FSInfoback to summary
protected FSInfo(Context context)
Annotations
@SuppressWarnings:this-escape

Method Detail

existsback to summary
public boolean exists(Path file)
getCanonicalFileback to summary
public Path getCanonicalFile(Path file)
getJarClassPathback to summary
public List<Path> getJarClassPath(Path file) throws IOException
getJarFSProviderback to summary
public synchronized FileSystemProvider getJarFSProvider()
instanceback to summary
public static FSInfo instance(Context context)

Get the FSInfo instance for this context.

Parameters
context:Context

the context

Returns:FSInfo

the Paths instance for this context

isDirectoryback to summary
public boolean isDirectory(Path file)
isFileback to summary
public boolean isFile(Path file)
readOnlyJarFSEnvback to summary
public Map<String, ?> readOnlyJarFSEnv(String releaseVersion)

Returns a FileSystem environment map suitable for creating read-only JAR file-systems with default timestamp information via FileSystemProvider#newFileSystem(Path, Map) or java.nio.file.FileSystems#newFileSystem(Path, Map).

Parameters
releaseVersion:String

the release version to use when creating a file-system from a multi-release JAR (or null to ignore release versioning).

tryResolveFileback to summary
pack-priv static URL tryResolveFile(URL base, String input) throws MalformedURLException

Attempt to return a file URL by resolving input against a base file URL.

Returns:URL

the resolved URL or null if the input is an absolute URL with a scheme other than file (ignoring case)