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

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

Introduction

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

Prototype

public Type getType() 

Source Link

Document

Return the type of change.

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);
}