org.springframework.boot.devtools.filewatch

Class ChangedFile



  • public final class ChangedFile
    extends Object
    A single file that has changed.
    Since:
    1.3.0
    Author:
    Phillip Webb
    See Also:
    ChangedFiles
    • Constructor Detail

      • ChangedFile

        public ChangedFile(File sourceFolder,
                           File file,
                           ChangedFile.Type type)
        Create a new ChangedFile instance.
        Parameters:
        sourceFolder - the source folder
        file - the file
        type - the type of change
    • Method Detail

      • getFile

        public File getFile()
        Return the file that was changed.
        Returns:
        the file
      • getType

        public ChangedFile.Type getType()
        Return the type of change.
        Returns:
        the type of change
      • getRelativeName

        public String getRelativeName()
        Return the name of the file relative to the source folder.
        Returns:
        the relative name
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object