Class FileRepository

java.lang.Object
org.apache.ivy.plugins.repository.AbstractRepository
org.apache.ivy.plugins.repository.file.FileRepository
All Implemented Interfaces:
Repository

public class FileRepository extends AbstractRepository
  • Constructor Details

    • FileRepository

      public FileRepository()
    • FileRepository

      public FileRepository(File basedir)
  • Method Details

    • getResource

      public Resource getResource(String source) throws IOException
      Description copied from interface: Repository
      Return 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

      public void get(String source, File destination) throws IOException
      Description copied from interface: Repository
      Fetch 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

      public void put(File source, String destination, boolean overwrite) throws IOException
      Overrides:
      put in class AbstractRepository
      Throws:
      IOException
    • move

      public void move(File src, File dest) throws IOException
      Throws:
      IOException
    • delete

      public void delete(File f) throws IOException
      Throws:
      IOException
    • getProgressListener

      protected RepositoryCopyProgressListener getProgressListener()
    • list

      public List<String> list(String parent) throws IOException
      Description copied from interface: Repository
      Return 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

      public File getBaseDir()
    • setBaseDir

      public final void setBaseDir(File baseDir)
    • standardize

      public String standardize(String source)
      Description copied from interface: Repository
      Normalize a string.
      Specified by:
      standardize in interface Repository
      Overrides:
      standardize in class AbstractRepository
      Parameters:
      source - The string to normalize.
      Returns:
      The normalized string.
    • getFileSeparator

      public String getFileSeparator()
      Description copied from interface: Repository
      Get the repository's file separator string.
      Specified by:
      getFileSeparator in interface Repository
      Overrides:
      getFileSeparator in class AbstractRepository
      Returns:
      The repository's file separator delimiter