Note that this is not intended to be a "complete" file-system interface. It currently only contains things needed by the GXP compiler.
Abstract FileSystem object for encasulating NFS and FTP file transfer.
FileSystem can work in 100% Pure Java mode or using native operating system atomic calls.This is an alpha state testing module.
@author Sergio Montoro Ten @version 6.0The default file system, obtained by invoking the {@link FileSystems#getDefault FileSystems.getDefault} method, provides access to the file system that isaccessible to the Java virtual machine. The {@link FileSystems} class definesmethods to create file systems that provide access to other types of (custom) file systems.
A file system is the factory for several types of objects:
The {@link #getPath getPath} method converts a system dependentpath string, returning a {@link Path} object that may be usedto locate and access a file.
The {@link #getPathMatcher getPathMatcher} method is usedto create a {@link PathMatcher} that performs match operations onpaths.
The {@link #getFileStores getFileStores} method returns an iteratorover the underlying {@link FileStore file-stores}.
The {@link #getUserPrincipalLookupService getUserPrincipalLookupService}method returns the {@link UserPrincipalLookupService} to lookup users orgroups by name.
The {@link #newWatchService newWatchService} method creates a{@link WatchService} that may be used to watch objects for changes andevents.
File systems vary greatly. In some cases the file system is a single hierarchy of files with one top-level root directory. In other cases it may have several distinct file hierarchies, each with its own top-level root directory. The {@link #getRootDirectories getRootDirectories} method may beused to iterate over the root directories in the file system. A file system is typically composed of one or more underlying {@link FileStore file-stores}that provide the storage for the files. Theses file stores can also vary in the features they support, and the file attributes or meta-data that they associate with files.
A file system is open upon creation and can be closed by invoking its {@link #close() close} method. Once closed, any further attempt to accessobjects in the file system cause {@link ClosedFileSystemException} to bethrown. File systems created by the default {@link FileSystemProvider provider}cannot be closed.
A {@code FileSystem} can provide read-only or read-write access to thefile system. Whether or not a file system provides read-only access is established when the {@code FileSystem} is created and can be tested by invokingits {@link #isReadOnly() isReadOnly} method. Attempts to write to file storesby means of an object associated with a read-only file system throws {@link ReadOnlyFileSystemException}.
File systems are safe for use by multiple concurrent threads. The {@link #close close} method may be invoked at any time to close a file system butwhether a file system is asynchronously closeable is provider specific and therefore unspecified. In other words, if a thread is accessing an object in a file system, and another thread invokes the {@code close} methodthen it may require to block until the first operation is complete. Closing a file system causes all open channels, watch services, and other {@link Closeable closeable} objects associated with the file system to be closed. @since 1.7
All user code that may potentially use the Hadoop Distributed File System should be written to use a FileSystem object. The Hadoop DFS is a multi-machine system that appears as a single disk. It's useful because of its fault tolerance and potentially very large capacity.
The local implementation is {@link LocalFileSystem} and distributedimplementation is {@link DistributedFileSystem}.
FileSystem
interface is an abstraction of a virtual file system. The similarities of its method names with with the methods of the java.io.File
class are intentional. On creation, the setInitializationData
method is called with any parameter data specified in the declaring plug-in's manifest.
Clients may subclass this class.
@since org.eclipse.core.filesystem 1.0public class MySensor implements Sensor { private final FileSystem fs; public MySensor(FileSystem fs) { this.fs = fs; } }
DefaultFileSystem fs = new DefaultFileSystem(); fs.add(new DefaultInputFile("src/foo/bar.php"));@since 4.2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|