Class VfsRepository
- java.lang.Object
-
- org.apache.ivy.plugins.repository.AbstractRepository
-
- org.apache.ivy.plugins.repository.vfs.VfsRepository
-
- All Implemented Interfaces:
Repository
public class VfsRepository extends AbstractRepository
Implementation of a VFS repository
-
-
Constructor Summary
Constructors Constructor Description VfsRepository()Create a new Ivy VFS Repository Instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidfinalize()voidget(java.lang.String srcVfsURI, java.io.File destination)Transfer a VFS Resource from the repository to the local file system.ResourcegetResource(java.lang.String vfsURI)Get a VfsResourcejava.util.Listlist(java.lang.String vfsURI)Return a listing of the contents of a parent directory.voidput(java.io.File source, java.lang.String vfsURI, boolean overwrite)Transfer an Ivy resource to a VFS repository-
Methods inherited from class org.apache.ivy.plugins.repository.AbstractRepository
addTransferListener, fireTransferCompleted, fireTransferCompleted, fireTransferError, fireTransferError, fireTransferEvent, fireTransferInitiated, fireTransferProgress, fireTransferStarted, fireTransferStarted, getFileSeparator, getName, hasTransferListener, put, removeTransferListener, setName, standardize, toString
-
-
-
-
Method Detail
-
finalize
protected void finalize()
- Overrides:
finalizein classjava.lang.Object
-
getResource
public Resource getResource(java.lang.String vfsURI) throws java.io.IOException
Get a VfsResource- Parameters:
source- aStringidentifying a VFS Resource- Returns:
- The resource associated with the resource identifier.
- Throws:
java.io.IOException- On error while trying to get resource.- See Also:
- "Supported File Systems in the jakarta-commons-vfs2 documentation"
-
get
public void get(java.lang.String srcVfsURI, java.io.File destination) throws java.io.IOExceptionTransfer a VFS Resource from the repository to the local file system.- Parameters:
srcVfsURI- aStringidentifying the VFS resource to be fetcheddestination- aFileidentifying the destination file- Throws:
java.io.IOException- On retrieval failure.- See Also:
- "Supported File Systems in the jakarta-commons-vfs2 documentation"
-
list
public java.util.List list(java.lang.String vfsURI) throws java.io.IOExceptionReturn a listing of the contents of a parent directory. Listing is a set of strings representing VFS URIs.- Parameters:
vfsURI- providing identifying a VFS provided resource- Returns:
- A listing of the parent directory's file content, as a List of String.
- Throws:
java.io.IOException- on failure.- See Also:
- "Supported File Systems in the jakarta-commons-vfs2 documentation"
-
put
public void put(java.io.File source, java.lang.String vfsURI, boolean overwrite) throws java.io.IOExceptionTransfer an Ivy resource to a VFS repository- Overrides:
putin classAbstractRepository- Parameters:
source- aFileindentifying the local file to transfer to the repositoryvfsURI- aStringidentifying the destination VFS Resource.overwrite- whether to overwrite an existing resource.- Throws:
java.io.IOException- See Also:
- "Supported File Systems in the jakarta-commons-vfs2 documentation"
-
-