org.kie.commons.java.nio.fs.jgit
Class JGitFileSystemProvider
java.lang.Object
org.kie.commons.java.nio.fs.jgit.JGitFileSystemProvider
- All Implemented Interfaces:
- FileSystemProvider
public class JGitFileSystemProvider
- extends Object
- implements FileSystemProvider
|
Method Summary |
void |
checkAccess(Path path,
AccessMode... modes)
|
void |
copy(Path source,
Path target,
CopyOption... options)
|
void |
createDirectory(Path path,
FileAttribute<?>... attrs)
|
void |
createLink(Path link,
Path existing)
|
void |
createSymbolicLink(Path link,
Path target,
FileAttribute<?>... attrs)
|
void |
delete(Path path)
|
void |
deleteAsset(JGitPathImpl path)
|
boolean |
deleteAssetIfExists(JGitPathImpl path)
|
void |
deleteBranch(JGitPathImpl path)
|
boolean |
deleteBranchIfExists(JGitPathImpl path)
|
boolean |
deleteIfExists(Path path)
|
void |
forceAsDefault()
|
|
getFileAttributeView(Path path,
Class<V> type,
LinkOption... options)
|
FileStore |
getFileStore(Path path)
|
FileSystem |
getFileSystem(URI uri)
|
static JGitFileSystemProvider |
getInstance()
|
Path |
getPath(URI uri)
|
String |
getScheme()
|
boolean |
isDefault()
|
boolean |
isHidden(Path path)
|
boolean |
isSameFile(Path pathA,
Path pathB)
|
static void |
loadConfig()
|
void |
move(Path source,
Path target,
CopyOption... options)
|
AsynchronousFileChannel |
newAsynchronousFileChannel(Path path,
Set<? extends OpenOption> options,
ExecutorService executor,
FileAttribute<?>... attrs)
|
SeekableByteChannel |
newByteChannel(Path path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
|
DirectoryStream<Path> |
newDirectoryStream(Path path,
DirectoryStream.Filter<Path> pfilter)
|
FileChannel |
newFileChannel(Path path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
|
FileSystem |
newFileSystem(Path path,
Map<String,?> env)
|
FileSystem |
newFileSystem(URI uri,
Map<String,?> env)
|
InputStream |
newInputStream(Path path,
OpenOption... options)
|
OutputStream |
newOutputStream(Path path,
OpenOption... options)
|
|
readAttributes(Path path,
Class<A> type,
LinkOption... options)
|
Map<String,Object> |
readAttributes(Path path,
String attributes,
LinkOption... options)
|
Path |
readSymbolicLink(Path link)
|
void |
setAttribute(Path path,
String attribute,
Object value,
LinkOption... options)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GIT_DEFAULT_REMOTE_NAME
public static final String GIT_DEFAULT_REMOTE_NAME
- See Also:
- Constant Field Values
REPOSITORIES_ROOT_DIR
public static final String REPOSITORIES_ROOT_DIR
- See Also:
- Constant Field Values
DEAMON_DEFAULT_ENABLED
public static final boolean DEAMON_DEFAULT_ENABLED
- See Also:
- Constant Field Values
DEAMON_DEFAULT_PORT
public static final int DEAMON_DEFAULT_PORT
- See Also:
- Constant Field Values
DEAMON_DEFAULT_HOST
public static final String DEAMON_DEFAULT_HOST
- See Also:
- Constant Field Values
DEAMON_DEFAULT_UPLOAD
public static final boolean DEAMON_DEFAULT_UPLOAD
- See Also:
- Constant Field Values
FILE_REPOSITORIES_ROOT
public static File FILE_REPOSITORIES_ROOT
DEAMON_ENABLED
public static boolean DEAMON_ENABLED
DEAMON_PORT
public static int DEAMON_PORT
DEAMON_UPLOAD
public static boolean DEAMON_UPLOAD
USER_NAME
public static final String USER_NAME
- See Also:
- Constant Field Values
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
INIT
public static final String INIT
- See Also:
- Constant Field Values
SCHEME_SIZE
public static final int SCHEME_SIZE
DEFAULT_SCHEME_SIZE
public static final int DEFAULT_SCHEME_SIZE
JGitFileSystemProvider
public JGitFileSystemProvider()
loadConfig
public static void loadConfig()
getInstance
public static JGitFileSystemProvider getInstance()
forceAsDefault
public void forceAsDefault()
- Specified by:
forceAsDefault in interface FileSystemProvider
isDefault
public boolean isDefault()
- Specified by:
isDefault in interface FileSystemProvider
getScheme
public String getScheme()
- Specified by:
getScheme in interface FileSystemProvider
newFileSystem
public FileSystem newFileSystem(Path path,
Map<String,?> env)
throws IllegalArgumentException,
UnsupportedOperationException,
IOException,
SecurityException
- Specified by:
newFileSystem in interface FileSystemProvider
- Throws:
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
newFileSystem
public FileSystem newFileSystem(URI uri,
Map<String,?> env)
throws IllegalArgumentException,
IOException,
SecurityException,
FileSystemAlreadyExistsException
- Specified by:
newFileSystem in interface FileSystemProvider
- Throws:
IllegalArgumentException
IOException
SecurityException
FileSystemAlreadyExistsException
getFileSystem
public FileSystem getFileSystem(URI uri)
throws IllegalArgumentException,
FileSystemNotFoundException,
SecurityException
- Specified by:
getFileSystem in interface FileSystemProvider
- Throws:
IllegalArgumentException
FileSystemNotFoundException
SecurityException
getPath
public Path getPath(URI uri)
throws IllegalArgumentException,
FileSystemNotFoundException,
SecurityException
- Specified by:
getPath in interface FileSystemProvider
- Throws:
IllegalArgumentException
FileSystemNotFoundException
SecurityException
newInputStream
public InputStream newInputStream(Path path,
OpenOption... options)
throws IllegalArgumentException,
UnsupportedOperationException,
NoSuchFileException,
IOException,
SecurityException
- Specified by:
newInputStream in interface FileSystemProvider
- Throws:
IllegalArgumentException
UnsupportedOperationException
NoSuchFileException
IOException
SecurityException
newOutputStream
public OutputStream newOutputStream(Path path,
OpenOption... options)
throws IllegalArgumentException,
UnsupportedOperationException,
IOException,
SecurityException
- Specified by:
newOutputStream in interface FileSystemProvider
- Throws:
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
newFileChannel
public FileChannel newFileChannel(Path path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
IOException,
SecurityException
- Specified by:
newFileChannel in interface FileSystemProvider
- Throws:
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
newAsynchronousFileChannel
public AsynchronousFileChannel newAsynchronousFileChannel(Path path,
Set<? extends OpenOption> options,
ExecutorService executor,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
IOException,
SecurityException
- Specified by:
newAsynchronousFileChannel in interface FileSystemProvider
- Throws:
IllegalArgumentException
UnsupportedOperationException
IOException
SecurityException
newByteChannel
public SeekableByteChannel newByteChannel(Path path,
Set<? extends OpenOption> options,
FileAttribute<?>... attrs)
throws IllegalArgumentException,
UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Specified by:
newByteChannel in interface FileSystemProvider
- Throws:
IllegalArgumentException
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
newDirectoryStream
public DirectoryStream<Path> newDirectoryStream(Path path,
DirectoryStream.Filter<Path> pfilter)
throws NotDirectoryException,
IOException,
SecurityException
- Specified by:
newDirectoryStream in interface FileSystemProvider
- Throws:
NotDirectoryException
IOException
SecurityException
createDirectory
public void createDirectory(Path path,
FileAttribute<?>... attrs)
throws UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Specified by:
createDirectory in interface FileSystemProvider
- Throws:
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
createSymbolicLink
public void createSymbolicLink(Path link,
Path target,
FileAttribute<?>... attrs)
throws UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Specified by:
createSymbolicLink in interface FileSystemProvider
- Throws:
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
createLink
public void createLink(Path link,
Path existing)
throws UnsupportedOperationException,
FileAlreadyExistsException,
IOException,
SecurityException
- Specified by:
createLink in interface FileSystemProvider
- Throws:
UnsupportedOperationException
FileAlreadyExistsException
IOException
SecurityException
delete
public void delete(Path path)
throws DirectoryNotEmptyException,
NoSuchFileException,
IOException,
SecurityException
- Specified by:
delete in interface FileSystemProvider
- Throws:
DirectoryNotEmptyException
NoSuchFileException
IOException
SecurityException
deleteAsset
public void deleteAsset(JGitPathImpl path)
deleteBranch
public void deleteBranch(JGitPathImpl path)
deleteIfExists
public boolean deleteIfExists(Path path)
throws DirectoryNotEmptyException,
IOException,
SecurityException
- Specified by:
deleteIfExists in interface FileSystemProvider
- Throws:
DirectoryNotEmptyException
IOException
SecurityException
deleteBranchIfExists
public boolean deleteBranchIfExists(JGitPathImpl path)
deleteAssetIfExists
public boolean deleteAssetIfExists(JGitPathImpl path)
readSymbolicLink
public Path readSymbolicLink(Path link)
throws UnsupportedOperationException,
NotLinkException,
IOException,
SecurityException
- Specified by:
readSymbolicLink in interface FileSystemProvider
- Throws:
UnsupportedOperationException
NotLinkException
IOException
SecurityException
copy
public void copy(Path source,
Path target,
CopyOption... options)
throws UnsupportedOperationException,
FileAlreadyExistsException,
DirectoryNotEmptyException,
IOException,
SecurityException
- Specified by:
copy in interface FileSystemProvider
- Throws:
UnsupportedOperationException
FileAlreadyExistsException
DirectoryNotEmptyException
IOException
SecurityException
move
public void move(Path source,
Path target,
CopyOption... options)
throws DirectoryNotEmptyException,
AtomicMoveNotSupportedException,
IOException,
SecurityException
- Specified by:
move in interface FileSystemProvider
- Throws:
DirectoryNotEmptyException
AtomicMoveNotSupportedException
IOException
SecurityException
isSameFile
public boolean isSameFile(Path pathA,
Path pathB)
throws IOException,
SecurityException
- Specified by:
isSameFile in interface FileSystemProvider
- Throws:
IOException
SecurityException
isHidden
public boolean isHidden(Path path)
throws IllegalArgumentException,
IOException,
SecurityException
- Specified by:
isHidden in interface FileSystemProvider
- Throws:
IllegalArgumentException
IOException
SecurityException
getFileStore
public FileStore getFileStore(Path path)
throws IOException,
SecurityException
- Specified by:
getFileStore in interface FileSystemProvider
- Throws:
IOException
SecurityException
checkAccess
public void checkAccess(Path path,
AccessMode... modes)
throws UnsupportedOperationException,
NoSuchFileException,
AccessDeniedException,
IOException,
SecurityException
- Specified by:
checkAccess in interface FileSystemProvider
- Throws:
UnsupportedOperationException
NoSuchFileException
AccessDeniedException
IOException
SecurityException
getFileAttributeView
public <V extends FileAttributeView> V getFileAttributeView(Path path,
Class<V> type,
LinkOption... options)
throws NoSuchFileException
- Specified by:
getFileAttributeView in interface FileSystemProvider
- Throws:
NoSuchFileException
readAttributes
public <A extends BasicFileAttributes> A readAttributes(Path path,
Class<A> type,
LinkOption... options)
throws NoSuchFileException,
UnsupportedOperationException,
IOException,
SecurityException
- Specified by:
readAttributes in interface FileSystemProvider
- Throws:
NoSuchFileException
UnsupportedOperationException
IOException
SecurityException
readAttributes
public Map<String,Object> readAttributes(Path path,
String attributes,
LinkOption... options)
throws UnsupportedOperationException,
IllegalArgumentException,
IOException,
SecurityException
- Specified by:
readAttributes in interface FileSystemProvider
- Throws:
UnsupportedOperationException
IllegalArgumentException
IOException
SecurityException
setAttribute
public void setAttribute(Path path,
String attribute,
Object value,
LinkOption... options)
throws UnsupportedOperationException,
IllegalArgumentException,
ClassCastException,
IOException,
SecurityException
- Specified by:
setAttribute in interface FileSystemProvider
- Throws:
UnsupportedOperationException
IllegalArgumentException
ClassCastException
IOException
SecurityException
Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.