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

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

Introduction

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

Prototype

public String getRelativeName() 

Source Link

Document

Return the name of the file relative to the source folder.

Usage

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

private ClassLoaderFiles getClassLoaderFiles(ClassPathChangedEvent event) throws IOException {
    ClassLoaderFiles files = new ClassLoaderFiles();
    for (ChangedFiles changedFiles : event.getChangeSet()) {
        String sourceFolder = changedFiles.getSourceFolder().getAbsolutePath();
        for (ChangedFile changedFile : changedFiles) {
            files.addFile(sourceFolder, changedFile.getRelativeName(), asClassLoaderFile(changedFile));
        }// w  ww . ja  v  a  2  s  . co  m
    }
    return files;
}