Class BuildFile

    • 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.
      • 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 be null.
        Returns:
        true if base time is null or 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 be null.
        Returns:
        true if base time is null or 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object