Package org.eolang.maven.footprint
Class FtDefault
- java.lang.Object
-
- org.eolang.maven.footprint.FtDefault
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<Path>
list(String ext)
Get list of saved regular files with ext.String
load(String program, String ext)
Get program content of a specific type.void
save(String program, String ext, org.cactoos.Scalar<String> content)
Save content.
-
-
-
Constructor Detail
-
FtDefault
public FtDefault(Path path)
Ctor.- Parameters:
path
- Main location.
-
-
Method Detail
-
load
public String load(String program, String ext) throws IOException
Description copied from interface:Footprint
Get program content of a specific type.That is, if the file contains "hello", it will return the string "hello".
- Specified by:
load
in interfaceFootprint
- Parameters:
program
- Program nameext
- 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.Leaves a "footprint" in the directory. So it can create a new file in the file system. Where it will create this file depends on the implementation.
- Specified by:
save
in interfaceFootprint
- Parameters:
program
- Program nameext
- File extensioncontent
- File content- Throws:
IOException
- In case of IO issues
-
list
public List<Path> list(String ext) throws IOException
Get list of saved regular files with ext.- Specified by:
list
in interfaceFootprint
- Parameters:
ext
- File extension- Returns:
- List of files
- Throws:
IOException
- In case of IO issues
-
-