Package io.helidon.build.dev
Class BuildFile
- java.lang.Object
-
- io.helidon.build.dev.BuildFile
-
- All Implemented Interfaces:
FileChangeAware
public class BuildFile extends Object implements FileChangeAware
A project build file that can detect modification.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<FileTime>changedTime()Returns the most recent change time, if any.Optional<FileTime>changedTimeIfNewerThan(FileTime baseTime)Tests whether or not this file has a modified time that is more recent than the base time.Optional<FileTime>changedTimeIfOlderThan(FileTime baseTime)Tests whether or not this file has a modified time that is more recent than the base time.static BuildFilecreateBuildFile(ProjectDirectory parent, FileType type, Path path)Returns a new build file.booleanequals(Object o)inthashCode()FileTimelastModifiedTime()Returns the last modified time.ProjectDirectoryparent()Returns the parent directory.Pathpath()Returns the path.StringtoString()FileTypetype()Returns the file type.voidupdate()Updates the last modified time.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.helidon.build.dev.FileChangeAware
hasChanged
-
-
-
-
Method Detail
-
createBuildFile
public static BuildFile createBuildFile(ProjectDirectory parent, FileType type, Path path)
Returns a new build file.- Parameters:
parent- The parent.type- The type.path- The file path.- Returns:
- The file.
-
parent
public ProjectDirectory parent()
Returns the parent directory.- Returns:
- The parent.
-
type
public FileType type()
Returns the file type.- Returns:
- The type.
-
path
public Path path()
Returns the path.- Returns:
- The path.
-
changedTime
public Optional<FileTime> changedTime()
Description copied from interface:FileChangeAwareReturns the most recent change time, if any.- Specified by:
changedTimein interfaceFileChangeAware- Returns:
- The time if changed.
-
changedTimeIfNewerThan
public Optional<FileTime> changedTimeIfNewerThan(FileTime baseTime)
Tests whether or not this file has a modified time that is more recent than the base time.- Parameters:
baseTime- The base time. May benull.- Returns:
trueif base time isnullor change time is newer.
-
changedTimeIfOlderThan
public Optional<FileTime> changedTimeIfOlderThan(FileTime baseTime)
Tests whether or not this file has a modified time that is more recent than the base time.- Parameters:
baseTime- The base time. May benull.- Returns:
trueif base time isnullor change time is older.
-
lastModifiedTime
public FileTime lastModifiedTime()
Returns the last modified time.- Returns:
- The last modified time.
-
update
public void update()
Updates the last modified time.
-
-