Class FtCached

  • All Implemented Interfaces:
    Footprint

    public final class FtCached
    extends Object
    implements Footprint
    Program footprint of EO compilation process.

    The footprint optionally cached in cache folder.

    Caching is applied if hash is not empty otherwise caching is ignored.
    Since:
    1.0
    • Constructor Detail

      • FtCached

        public FtCached​(String hash,
                        Path cache,
                        Footprint origin)
        Ctor.
        Parameters:
        hash - Version tag
        cache - Cache root
        origin - Origin
    • Method Detail

      • load

        public String load​(String program,
                           String ext)
                    throws IOException
        Description copied from interface: Footprint
        Get program content of a specific type.
        Specified by:
        load in interface Footprint
        Parameters:
        program - Program name
        ext - File extension which defines the type
        Returns:
        Content of a file
        Throws:
        IOException - In case of IO issue.
      • save

        public void save​(String program,
                         String ext,
                         org.cactoos.Scalar<String> content)
                  throws IOException
        Description copied from interface: Footprint
        Save content.
        Specified by:
        save in interface Footprint
        Parameters:
        program - Program name
        ext - File extension
        content - File content
        Throws:
        IOException - In case of IO issues
      • list

        public List<Path> list​(String ext)
                        throws IOException
        Description copied from interface: Footprint
        Get list of saved regular files with ext.
        Specified by:
        list in interface Footprint
        Parameters:
        ext - File extension
        Returns:
        List of files
        Throws:
        IOException - In case of IO issues