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
1
vote
0 answers

Is there a mime type aware virtual file system with OS and S3 bindings in Java?

I'm looking for an abstraction that provides access to the operating system's file system and S3 in the same way. However, it want to be able to set and get the file's mime type explicitly. In case of the operating system's file system it would…
Wilfred Springer
  • 10,869
  • 4
  • 55
  • 69
1
vote
1 answer

NullPointer when trying to get ContentInfo from VFS FileObject

I'm successfully using VFS to download files from HTTP, SFTP, FTP, etc. I need to get the content type of the file and I've run into a strange thing that I'm not sure why is happening. FileObject file = vfs.resolveFile(uri) ; FileContent content =…
Svish
  • 152,914
  • 173
  • 462
  • 620
1
vote
1 answer

apache common-vfs ThreadPool Configuration

Is there any configuration for common-vfs to set the ThreadPool? I use this vfs in WSO2 ESB apache Synapse. I already look for the documentation etc, but i found nothing said about ThreadPool in vfs. So how can i configure it? Thanks, for your help…
Mari_Yaguchi
  • 477
  • 8
  • 25
1
vote
1 answer

Could not list the contents of because it is not a folder in Windows FTP server?

The root directory is: /ftp/kathir and the Change directory is : /ftp/kathir This works pretty fine when the FTP server is linux. The same doesn't work on Windows. I have configured Guilt FTP server to test the FTP operations locally and all…
Kathir
  • 2,733
  • 12
  • 39
  • 67
1
vote
1 answer

vfs2 DefaultFileMonitor thread terminates prematurely

I'm having trouble keeping the vfs2's DefaultFileMonitor thread alive. The main thread of execution just terminates gracefully after the monitor object has been started. I'm wondering why this object wouldn't be "monitoring" and just goes right to…
Dominic
  • 341
  • 2
  • 5
  • 15
1
vote
0 answers

Apache Commons VFS2 - Cannot create FileObject to FTP to an IIS Virtual Directory

I'm using Apache Commons VFS2 API (version 2.0) for a generic implementation to FTP or SFTP files. It has been working great till we had Virtual Directories as FTP destinations. I get NullpointerException trying to obtain an OutputStream from the…
1
vote
1 answer

apache commons VFS : how to resolve file having % character in file name?

How to run apache common VFS resolovefile on my file with % character in the name ? org.apache.commons.vfs.FileSystemException: Invalid URI escape sequence "%FILENAME" Regards, G Samrat
Samrat
  • 367
  • 2
  • 4
  • 21
1
vote
1 answer

%2f or other special character in common vfs

Recently, I meet a problem when resolve file path by commons-vfs. FileObject tmpDestFo = fsm.resolveFile("/tmp/tempfile%2flicense.xml"); tmpDestFo.copyFrom(destFo); As the example, what I expect after the copying is a file named…
Javen
  • 173
  • 3
  • 10
1
vote
1 answer

StaticUserAuthenticator does not set FTP username in VFS2

I am trying to user the StaticUserAuthenticator with an FTP connection through ApacheVFS2 - I have the following code: this.fsOptions = new FileSystemOptions(); StaticUserAuthenticator auth = new StaticUserAuthenticator(null, username, password);…
clumsyjedi
  • 477
  • 6
  • 15
1
vote
1 answer

Unable to download file via VFS in windows machine?

I'm downloading a file from the FTP server using the below StandardFileSystemManager -> resolveFile and copyFrom(fileobject, Selectors.SELECT_SELF) The local folders were created automatically and file has been successfully downloaded in LINUX…
Kathir
  • 497
  • 2
  • 6
  • 14
1
vote
2 answers

How do I monitor the progress of a file transfer in Apache Commons VFS?

Using Apache Commons VFS, how do I monitor the progress of a file transfer. I need to be able to do it with uploads and downloads. I also need to monitor progress over HTTP, FTP, SFTP and FTPS. I can't find anything in the documentation about it.
Daniel
  • 10,115
  • 3
  • 44
  • 62
0
votes
0 answers

java: apache VFS implement custom function

I am using apache VFS to perform file system operations for S3 using: https://github.com/abashev/vfs-s3 In case of version enabled bucket need to implement some of custom operation like: delete files with all versions (need to pass versionId along…
mcacorner
  • 1,304
  • 3
  • 22
  • 45
0
votes
1 answer

Apache VFS SFTP Connection hangs

I am using Apache VFS to upload a file to an SFTP server, if the file is newer than the file on the server or doesn't exist there yet. The server connection uses SSH Keys for Authentication. I am using the following java code (plus error handling…
simonalexander2005
  • 4,338
  • 4
  • 48
  • 92
0
votes
1 answer

Efficient way to merge two files using apache Apache Commons VFS

I have two huge files which I need to merge to another file. Currently I am using Apache Commons VFS to connect to sftp server and merge them. I am using the below logic to merge files for(String file: filesToMerge){ try( FileObject…
0
votes
1 answer

Java vfs2 FileSystemException invalid privatekey. How to solve it?

In my springboot application, i am transferring a file to sftp. I want to authenticate it only with username and password. However my java code still looking for private key to send, and i am getting the bellow error. How can i solve the below…