Example usage for org.springframework.boot.devtools.filewatch ChangedFile getFile

List of usage examples for org.springframework.boot.devtools.filewatch ChangedFile getFile

Introduction

In this page you can find the example usage for org.springframework.boot.devtools.filewatch ChangedFile getFile.

Prototype

public File getFile() 

Source Link

Document

Return the file that was changed.

Usage

From source file:org.springframework.boot.devtools.remote.client.ClassPathChangeUploader.java

private ClassLoaderFile asClassLoaderFile(ChangedFile changedFile) throws IOException {
    ClassLoaderFile.Kind kind = TYPE_MAPPINGS.get(changedFile.getType());
    byte[] bytes = (kind == Kind.DELETED ? null : FileCopyUtils.copyToByteArray(changedFile.getFile()));
    long lastModified = (kind == Kind.DELETED ? System.currentTimeMillis()
            : changedFile.getFile().lastModified());
    return new ClassLoaderFile(kind, lastModified, bytes);
}