org.apache.ivy.plugins.repository.file

## 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 Summary

    Constructors
    Constructor and Description
    `FileRepository()`
    `FileRepository(java.io.File basedir)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `delete(java.io.File f)`
    `void` | `get(java.lang.String source, java.io.File destination)` Fetch a resource from the repository.
    `java.io.File` | `getBaseDir()`
    `java.lang.String` | `getFileSeparator()` Get the repository's file separator string.
    `protected RepositoryCopyProgressListener` | `getProgressListener()`
    `Resource` | `getResource(java.lang.String source)` Return the resource associated with a specified identifier.
    `boolean` | `isLocal()`
    `java.util.List` | `list(java.lang.String parent)` Return a listing of resources names
    `void` | `move(java.io.File src, java.io.File dest)`
    `void` | `put(java.io.File source, java.lang.String destination, boolean overwrite)`
    `void` | `setBaseDir(java.io.File baseDir)`
    `void` | `setLocal(boolean local)`
    `java.lang.String` | `standardize(java.lang.String source)` Normalize a string.

    - ### Methods inherited from class org.apache.ivy.plugins.repository.AbstractRepository

      `addTransferListener, fireTransferCompleted, fireTransferCompleted, fireTransferError, fireTransferError, fireTransferEvent, fireTransferInitiated, fireTransferProgress, fireTransferStarted, fireTransferStarted, getName, hasTransferListener, put, removeTransferListener, setName, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### FileRepository

          public FileRepository()

    - #### FileRepository

          public FileRepository(java.io.File basedir)

  - ### Method Detail

    - #### getResource

          public Resource getResource(java.lang.String source)
                               throws java.io.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:
        `java.io.IOException` - On error while trying to get resource.

    - #### get

          public void get(java.lang.String source,
                 java.io.File destination)
                   throws java.io.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:
        `java.io.IOException` - On retrieval failure.

    - #### put

          public void put(java.io.File source,
                 java.lang.String destination,
                 boolean overwrite)
                   throws java.io.IOException

      Overrides:
        `put` in class `AbstractRepository`
      Throws:
        `java.io.IOException`

    - #### move

          public void move(java.io.File src,
                  java.io.File dest)
                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### delete

          public void delete(java.io.File f)
                      throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getProgressListener

          protected RepositoryCopyProgressListener getProgressListener()

    - #### list

          public java.util.List list(java.lang.String parent)
                              throws java.io.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, as a List of String.
      Throws:
        `java.io.IOException` - On listing failure.

    - #### isLocal

          public boolean isLocal()

    - #### setLocal

          public void setLocal(boolean local)

    - #### getBaseDir

          public java.io.File getBaseDir()

    - #### setBaseDir

          public final void setBaseDir(java.io.File baseDir)

    - #### standardize

          public java.lang.String standardize(java.lang.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 java.lang.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