Example usage for org.apache.commons.vfs2.provider GenericFileName toString

List of usage examples for org.apache.commons.vfs2.provider GenericFileName toString

Introduction

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

Prototype

@Override
public String toString() 

Source Link

Document

Returns the URI of the file.

Usage

From source file:org.pentaho.di.core.vfs.SftpFileSystemWindowsProvider.java

public static SftpFileSystemWindows getSftpFileSystemWindows(SftpFileObject sftpFileObject)
        throws FileSystemException {
    GenericFileName fileName;
    if (sftpFileObject.isFolder()) {
        fileName = (GenericFileName) sftpFileObject.getName();
    } else {// w  ww  .  j a  va2  s .  c o m
        fileName = (GenericFileName) sftpFileObject.getParent().getName();
    }
    SftpFileSystemWindows sftpFileSystemWindows = sftpFileSystemWindowsMap.get(fileName.toString());
    if (sftpFileSystemWindows == null) {
        sftpFileSystemWindows = new SftpFileSystemWindows(fileName, null,
                sftpFileObject.getFileSystem().getFileSystemOptions());
        sftpFileSystemWindowsMap.put(fileName.toString(), sftpFileSystemWindows);
    }
    return sftpFileSystemWindows;
}