Package bm.target

Interface FileState

All Superinterfaces:
StateProvider
All Known Implementing Classes:
FileBooleanState, FileContentState

public interface FileState extends StateProvider
  • Method Details

    • getTargetPath

      Path getTargetPath()
      The path of the target this objects represents.
      Returns:
      path of the target
    • getManagedFiles

      List<Path> getManagedFiles()
      Provides known files.
      Returns:
      the list of files in the directory managed by this target or the single file it represents
    • getManagedRelative

      default List<Path> getManagedRelative()
      Provides known files below the target but as paths relative to the target
      Returns:
      the list of files in the directory managed by this target or the single file it represents
    • toFileTarget

      default FileTarget toFileTarget()
      Creates a FileTarget from this with no dependencies and no builder.
      Returns:
      a new FileTarget
    • toFileTarget

      default <T extends Target> FileTarget toFileTarget(List<T> dependencies, ConsumeOrThrow<FileTarget> builder)
      Creates a FileTarget from this with the given dependencies and builder.
      Returns:
      a new FileTarget