Questions tagged [apache-commons-vfs]

Apache Commons VFS provides a single API for accessing various different file systems.

Apache Commons VFS provides a single API for accessing various different file systems. It presents a uniform view of the files from various different sources, such as the files on local disk, on an HTTP server, or inside a Zip archive.

156 questions
2
votes
1 answer

Writing Junit Test case for merging files in sftp server

I am using apache commons VFS to connect to sftp server and write the content of files in /input directory into a single file in /output directory.The names of files in input directory is provided as a List. I am struggling to write Junit test case…
2
votes
3 answers

Using Commons-VFS over HTTP

I am trying to browse and retrieve files from an HTTP server using the Commons VFS to implement the directory browsing functionality, find below my code snippet, try { StandardFileSystemManager manager = new StandardFileSystemManager(); …
SK7
  • 21
  • 1
  • 3
2
votes
0 answers

Using apache sshd and commons vfs on windows

I'm recently working on a file agent that will be deployed on machine of both linux and windows to perform unified file transfer. It generally consist of a sshd server and a vfs manager. Usually one agent would use the vfs manager to connect to the…
Qiuchi
  • 21
  • 3
2
votes
1 answer

Uploading to remote FTP server using Apache Commons VFS

I'm attempting to upload a zipped file to a remote FTP server using Apache VFS. The environment in which this is being executed in is an AWS Java 8 Lambda if it's relevant. This is my current implementation which generally follows the example…
Adam Freymiller
  • 1,929
  • 7
  • 27
  • 49
2
votes
1 answer

Why does Apache Commons VFS consider Http Proxy and Socks5 Proxy but simply ignore Socks4 Proxy?

I am working on a application that connects to an SFTP server and downloads files using Apache Commons VFS, it works just fine, with the exception that the system needs to allow the user to specify a proxy, as needed. Now, I know Apache Commons VFS…
Eduardo M
  • 41
  • 5
2
votes
1 answer

How to get the date of a file in Apache vfs

I'm trying to get the date of a file which is in a Apache vfs. There is a getAttribute-Method in org.apache.commons.vfs2.FileSystem, but I can't find any examples on how to use it. I'm pretty sure that it is possible by using this method. The…
LaaKii
  • 95
  • 11
2
votes
2 answers

apache VFS2 uriStyle - root absolute path ends with double slash

while working on an ftp server with the vfs2 library I noticed, that I had to enable VFS.setUriStyle(true) so the library would change the working directory to parent directory of the target file I am operating on (cwd directoryName). But if…
Barry
  • 337
  • 1
  • 2
  • 15
2
votes
0 answers

How to terminate long running VFS operation

I need to terminate long running SFTP put operations (sometimes the transfer hangs and takes 10-15 minutes to complete). Is there a way to do this using Apache VFS? The SftpFileSystemConfigBuilder has a setTimeout method, but that only affects the…
szmeti
  • 241
  • 1
  • 7
2
votes
1 answer

How to skip password prompt during SFTP using commons-VFS

I am trying to upload file from windows to Linux using apache-commons-vfs API. I am able to upload file using this utility but when program runs, its asking for credentials to enter even its already there in the code. If we enter blank in…
SomMS
  • 567
  • 3
  • 23
2
votes
1 answer

vfs2 and samba(smb) version 2

we disabled smbv1 in our windows machine and now we can't connect using smb2 we are using commons-vfs2(2.0) and commons-vfs2-sandbox(2.0) here is my code: @Test public void testConnection() throws FileSystemException { String folder =…
Michael Biniashvili
  • 500
  • 1
  • 12
  • 24
2
votes
1 answer

SFTP connection with apache vfs fails but is successful with WinSCP

I can successfully connect with WinSCP, using given credentials, to SFTP server. But when doing it from java using apache vfs I get error: Caused by: org.apache.commons.vfs2.FileSystemException: Could not connect to SFTP server at…
mismas
  • 1,236
  • 5
  • 27
  • 55
2
votes
1 answer

Apache CommonsVFS connect to https server

Currently I use Apache CommonsVFS to fetch images from other sites and it works well. The website of CommonsVFS says it supports HTTPS protocol, but I found I could not access those URL starts with https:// using CommonVFS, while I could browse it…
Brian Hsu
  • 8,781
  • 3
  • 47
  • 59
2
votes
2 answers

Configuring pentaho's hdfs-vfs to pick up hdfs-site.xml

I just started to use Pentaho's HDFS VFS and don't know much about this project. I am trying to have my Hadoop config files read from an external location. This seems to work fine for all files except hdfs-site.xml. The failure occurs in the VFS…
Qian Yu
  • 21
  • 2
2
votes
2 answers

Apache VFS relative path

I try to get folder's parent with Apache VFS using relative path, but I get "Invalid relative path" public static void main(String[] args) throws Exception { FileSystemManager fileSystemManager = VFS.getManager(); FileObject fileObject =…
2
votes
1 answer

ClassNotFoundException: org.apache.commons.vfs.provider.FileProvider

I'm using the vfs2 (not vfs) to access ftp. Now I also use the smb protocol but it does not work. I always get the Exception: ClassNotFoundException: org.apache.commons.vfs.provider.FileProvider But as I'm using vfs2 it is weird that it searches…
Philipp
  • 4,645
  • 3
  • 47
  • 80