Example usage for org.apache.commons.vfs2.provider AbstractFileName getPath

List of usage examples for org.apache.commons.vfs2.provider AbstractFileName getPath

Introduction

In this page you can find the example usage for org.apache.commons.vfs2.provider AbstractFileName getPath.

Prototype

public String getPath() 

Source Link

Document

Returns the absolute path of the file, relative to the root of the file system that the file belongs to.

Usage

From source file:com.github.junrar.vfs2.provider.rar.RARFileSystem.java

/**
 * Creates a file object./*from w  ww.j  a  va2  s  .com*/
 */
@Override
protected FileObject createFile(final AbstractFileName name) throws FileSystemException {
    String path = name.getPath().substring(1);
    if (path.length() == 0) {
        return new RARFileObject(name, archive, null, this);
    } else if (files.containsKey(name.getPath())) {
        return new RARFileObject(name, archive, files.get(name.getPath()), this);
    }
    return null;
}