Class FileRepository
java.lang.Object
org.apache.ivy.plugins.repository.AbstractRepository
org.apache.ivy.plugins.repository.file.FileRepository
- All Implemented Interfaces:
Repository
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidFetch a resource from the repository.Get the repository's file separator string.protected RepositoryCopyProgressListenergetResource(String source) Return the resource associated with a specified identifier.booleanisLocal()Return a listing of resources namesvoidvoidfinal voidsetBaseDir(File baseDir) voidsetLocal(boolean local) standardize(String source) Normalize a string.Methods inherited from class AbstractRepository
addTransferListener, fireTransferCompleted, fireTransferCompleted, fireTransferError, fireTransferError, fireTransferEvent, fireTransferInitiated, fireTransferProgress, fireTransferStarted, fireTransferStarted, getName, getTimeoutConstraint, hasTransferListener, put, removeTransferListener, setName, toString
-
Constructor Details
-
FileRepository
public FileRepository() -
FileRepository
-
-
Method Details
-
getResource
Description copied from interface:RepositoryReturn the resource associated with a specified identifier. If the resource does not exist, it should return a Resource with exists() returning false. An IOException should only be thrown when a real IO problem occurs, like the impossibility to connect to a server.- Parameters:
source- A string identifying the resource.- Returns:
- The resource associated with the resource identifier.
- Throws:
IOException- On error while trying to get resource.
-
get
Description copied from interface:RepositoryFetch a resource from the repository.- Parameters:
source- A string identifying the resource to be fetched.destination- Where to place the fetched resource.- Throws:
IOException- On retrieval failure.
-
put
- Overrides:
putin classAbstractRepository- Throws:
IOException
-
move
- Throws:
IOException
-
delete
- Throws:
IOException
-
getProgressListener
-
list
Description copied from interface:RepositoryReturn a listing of resources names- Parameters:
parent- The parent directory from which to generate the listing.- Returns:
- A listing of the parent directory's file content
- Throws:
IOException- On listing failure.
-
isLocal
public boolean isLocal() -
setLocal
public void setLocal(boolean local) -
getBaseDir
-
setBaseDir
-
standardize
Description copied from interface:RepositoryNormalize a string.- Specified by:
standardizein interfaceRepository- Overrides:
standardizein classAbstractRepository- Parameters:
source- The string to normalize.- Returns:
- The normalized string.
-
getFileSeparator
Description copied from interface:RepositoryGet the repository's file separator string.- Specified by:
getFileSeparatorin interfaceRepository- Overrides:
getFileSeparatorin classAbstractRepository- Returns:
- The repository's file separator delimiter
-