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

Http File Transfer using Commons VFS

Can any one provide me an example implementation to transfer files from http server to Local using Commons VFS API. I have tried below code, StandardFileSystemManager manager = new StandardFileSystemManager(); manager.init(); if…
anand_206
  • 31
  • 4
2
votes
2 answers

Specific file monitor using Apache Commons VFS API

I want to perform some operation after a file named (XXXXXX.txt) created in the specific directory. I just don't want to monitor the whole directory. How can i achieve this using Apache Commons VFS API? I tried with the below code, but it did not…
2
votes
1 answer

Navigate to the root directory via FTP URI with Apache Commons VFS

I have no idea how to reference a file from the root directory. Currently, any path in the URI is child of the user directory. I'm trying to access /var/www with this: sftp://user:password@host/var/www but it's…
Tasso Evangelista
  • 1,612
  • 1
  • 16
  • 23
2
votes
3 answers

Trying to set up Amazon S3 filesystem in Apache Commons VFS in java

I'm trying to use VFS S3 a plugin for the Apache Commons VFS for Amazon S3. I've included the jar and it's recognising the s3 schema. However when I try to open a file (which is public, I can open it on my web browser), I get this error: Could not…
Amandasaurus
  • 58,203
  • 71
  • 188
  • 248
2
votes
1 answer

VFS write file to non-existing folder

I write a file with vfs to a folder which does not exist. I expect an exception or creation of this folder. But none of them happen, instead there is a file created with the missing folder name (at least the content of the file is then correct).…
Darkpara
  • 304
  • 1
  • 2
  • 14
2
votes
1 answer

Resume file download with Apache VFS

I have an application that uses VFS to download files over FTP or SFTP. When the file is large and the network connection is lost I currently have to start the download again. Is it possible to do a resumable file download with VFS?
zorro2b
  • 2,227
  • 4
  • 28
  • 45
1
vote
1 answer

SSH URI error with Apache VFS

I'm getting the following error in an Android application with Apache VFS and I can't find much on the google to help. I'm trying to upload a file via SSH and I get this rather vague error. The URI, as reported in logcat, looks correct to me…
Carnivoris
  • 793
  • 3
  • 7
  • 23
1
vote
1 answer

On doing BufferedReader.readLine() : Unexpected end of ZILB input stream

I am trying to read one line at a time using bufferedReader like following BufferedReader.readLine() and I am getting the following stack trace. java.io.EOFException: Unexpected end of ZLIB input stream at…
user882196
  • 1,691
  • 9
  • 24
  • 39
1
vote
0 answers

Apache Commons VFS copyFrom in the same host uses the network

I am making a FTP client using apache.commons.vfs and I want to add the copy and paste functionality for the files in the remote server. I used the copyFrom method to copy the files: destFile.copyFrom(srcFile, Selectors.SELECT_ALL) The problem is…
Gnis
  • 11
  • 2
1
vote
0 answers

jsch thread hanging while reading from SFTP

I have noticed slowness in reading data from SFTP server, I have 10 parallel processes running in the different containers which are reading this data and slowness is usually observed in one container randomly. I am using commons-vfs to read data…
banjara
  • 3,800
  • 3
  • 38
  • 61
1
vote
1 answer

JSch SFTP connections getting stuck

We have a java 7 code base where we are using Apache commons vfs2 v2.2 which is using JSch-0.1.54 as sftp provider. Now, the use case is to transfer files to a remote host via sftp. But, every now and then, the file upload process gets stuck. After…
Manish Bansal
  • 2,400
  • 2
  • 21
  • 37
1
vote
1 answer

Apache commons VFS cannot resolve files with String URI

I'm trying to access and read files through a Spring boot web application by using Apache Commons VFS v2.6.0. The web application is running in a hosted docker container and a separate AWS storage was mounted in the same docker by targeting /mnt.…
ThilankaD
  • 1,021
  • 1
  • 13
  • 24
1
vote
1 answer

apache VFS with res and zip together

I would expect this work. FileSystemManager fileSystemManager = VFS.getManager(); FileObject fileObject = fileSystemManager.resolveFile("zip:res:hello.zip"); But I'm getting URI "res:hello.zip" is not an absolute file name. With this I'm…
dom farr
  • 4,041
  • 4
  • 32
  • 38
1
vote
1 answer

Single file copy with Apache Commons VFS made destination folder into a file

I'm trying to copy a single file in the local file system to a remote SFTP server using Apache Commons VFS. to mimic the actual problem, I have written the following code which generates the same issue. FileSystemManager fileSystemManager =…
ThilankaD
  • 1,021
  • 1
  • 13
  • 24
1
vote
0 answers

Apache Commons VFS for reading files from secure network is working on one environment but not on another?

I'm using Apache Commons VFS library to read files from a secure network location. The extracted jar of this project is working fine in my development machine, but when deployed on dev server (different network) it is neither throwing any exception…
Ashraf
  • 143
  • 1
  • 8