Class FileSystemResourceRepository

java.lang.Object
org.cyclopsgroup.gitcon.FileSystemResourceRepository
All Implemented Interfaces:
LocalResourceRepository, ResourceRepository

public class FileSystemResourceRepository extends Object implements LocalResourceRepository
A simple implementation that points to a local directory to get resources
  • Constructor Details

    • FileSystemResourceRepository

      public FileSystemResourceRepository(File rootDirectory)
    • FileSystemResourceRepository

      public FileSystemResourceRepository(String rootDirectory)
  • Method Details

    • getRepositoryDirectory

      public File getRepositoryDirectory()
      Description copied from interface: LocalResourceRepository
      Get root directory of local repository
      Specified by:
      getRepositoryDirectory in interface LocalResourceRepository
      Returns:
      Root directory of local repository
    • getResource

      public Resource getResource(String filePath)
      Description copied from interface: ResourceRepository
      Get file object for given relative file path in repository
      Specified by:
      getResource in interface ResourceRepository
      Parameters:
      filePath - File path relative to the root of repository
      Returns:
      A file object. File may not exist if file path points to no where, in which case this call does not fail.