I’m using Apache Commons VFS (Virtual File System) to access some files over SFTP. Does anybody know how to check if an instance of org.apache.commons.vfs.FileContent is folder?
I’m using Apache Commons VFS (Virtual File System) to access some files over SFTP.
Share
If you mean checking
FileObject, then you can use [FileObject.getType()](http://commons.apache.org/vfs/apidocs/org/apache/commons/vfs/FileObject.html#getType(). Given a non-emptyFileContent, you would always assume it’s coming from a file. As the specification here says: