Interface FileSpec

All Superinterfaces:
FilePathSpec<File>, GeneratorSpec<File>, PathGeneratorSpec<File>, ValueSpec<File>

public interface FileSpec extends FilePathSpec<File>
Spec for generating File values.
Since:
2.6.0
  • Method Summary

    Modifier and Type
    Method
    Description
    Terminal method to indicate that the generated path, including parent directories (if any), should be created as a directory in the file system.
    Terminal method to indicate that the generated path, including parent directories (if any), should be created as a file in the file system.
    Terminal method to indicate that the generated path, including parent directories (if any), should be created as a file in the file system and content provided by the input stream written to the file.
    name(Generator<String> nameGenerator)
    Generator for the file or directory name.
    prefix(String prefix)
    File or directory name prefix.
    suffix(String suffix)
    File or directory name suffix.
    tmp()
    Generate path with java.io.tmpdir as the parent directory.

    Methods inherited from interface org.instancio.generator.ValueSpec

    get, list, map, nullable, stream, toModel