Example usage for com.google.common.io MoreFiles getNameWithoutExtension

List of usage examples for com.google.common.io MoreFiles getNameWithoutExtension

Introduction

In this page you can find the example usage for com.google.common.io MoreFiles getNameWithoutExtension.

Prototype

public static String getNameWithoutExtension(Path path) 

Source Link

Document

Returns the file name without its <a href="http://en.wikipedia.org/wiki/Filename_extension">file extension</a> or path.

Usage

From source file:internal.workspace.file.LegacyIndexer.java

@Override
public Index loadIndex() throws IOException {
    try {//from w w  w. j  ava2s .c om
        return xmlToIndex(unmarshalIndex(file), MoreFiles.getNameWithoutExtension(file));
    } catch (JAXBException ex) {
        throw new IOException(ex);
    }
}