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

mac os java connect to network drive

I am currently using Mac Yosemite. I have to copy files from one folder to another folder on network drive. The code works fine in Windows 7, but the same code does not work in Mac. The files are on Windows Server. So, with a bit of research online,…
9 PENCE
  • 343
  • 1
  • 4
  • 8
1
vote
1 answer

Using commons-vfs sync ant task from groovy

Trying to use the commons-vfs sync ant task from Groovy. Solved most of the things, but still having some issues. Here is my groovy script: @Grapes([ @Grab(group='org.apache.commons', module='commons-vfs2', version='2.0'), …
SteveDonie
  • 8,700
  • 3
  • 43
  • 43
1
vote
0 answers

J2EE and virtual filesystem for file storage

I'm struggling with this problem now "How to store some files on filesystem in J2EE web application" It is said, that for portability reasons accessing FS is at least not recommended. I'd like to know what are other possibilities, to make it more…
Zveratko
  • 2,663
  • 6
  • 35
  • 64
1
vote
0 answers

How to Configure Commons VFS to call GETmethod of http

I am calling one API which supports get call to download a file. But when I call resolveFile metthod of FileSystemManager it calls HEAD method by default. Can anybody tell me how to call a HTTP GET in Commons VFS ? Some way to set request method…
Lucky
  • 31
  • 1
  • 1
  • 4
1
vote
2 answers

Commons VFS and IBM MVS System

I'm using Apache Commons VFS / SFTP, we are trying to download files from the IBM MVS system. The download part is all good, however, we can not open up the zipped files after downloading. Seems like the zip file was compressed using a different…
Liming
  • 1,641
  • 3
  • 28
  • 38
1
vote
1 answer

How to properly clear VFS Ram filesystem

I'm using VFS2 to construct an in-memory filesystem (uring the ram scheme) for tests. After each test I've to clean up (destroy all created files and folders), I'm using the following command: VFS.getManager().getFilesCache().close(); However this…
bachr
  • 5,780
  • 12
  • 57
  • 92
1
vote
1 answer

Commons VFS : SFTP URL Syntax while connecting to Windows Server running with Open SSH

We are using Commons VFS API for file transfer between different servers. The Code works perfectly for the Linux Servers. But We are having URL Syntax issues for Windows Servers. We tried below list of URL types but all of them resulted in Invalid…
anand_206
  • 31
  • 4
1
vote
1 answer

How to find disk space of remote linux machine using Java

I am looking for simple solution for finding total disk space and available space of a remove machine using java program. Please help Update There are questions already similar to this with primarily focus on local machine. I was looking solution…
devThoughts
  • 820
  • 1
  • 12
  • 18
1
vote
1 answer

Integration of apache common vfs and mercurial

Can Apache common vfs api retrieve/update/add files from/to the Mercurial version control system? Common vfs does have an interface api for accessing vcs. Is there a provider for Mercurial? hbagchi
hbagchi
1
vote
1 answer

Apache commons sftp - go above user home directory

We have a server which uses the following convention: /pathA/Users/ /pathB/data/ When users log in they end up at the respective /pathA/Users/user/ dir, but they sometimes need to access /pathB/data/ . I want to write a browser that, using sftp,…
Puchatek
  • 1,477
  • 3
  • 15
  • 33
1
vote
2 answers

SFTP to a remote location without a password/key pair

We are trying to provide an SFTP adapter in a Spring based environment to transfer files from local to either local or remote server.But, we dont have any password configured for the users in the remote location. All implementations like…
javaShilp
  • 59
  • 1
  • 6
1
vote
2 answers

How do I check the integrity of files that are being copied over the network with my automation tool?

I want to programmatically check the integrity of the files that I'm copying to a shared folder, this is part of a set of steps that are executed by an automation tool so I'm looking for the best (most elegant) way to make it more reliable without…
the_marcelo_r
  • 1,847
  • 22
  • 35
1
vote
0 answers

FileListener is not fired when a new file comes in

I have a service monitoring a folder with apache vfs2. All works fine but for some files my custom listeners are not fired and I don't know why. I only see this log : org.apache.commons.vfs2.cache.SoftRefFilesCache - putFile:…
Gerard Ribas
  • 717
  • 1
  • 9
  • 17
1
vote
3 answers

When a file gets deleted that is being monitored with VFS (apache commons) I don't get notified when the file gets added back

I have a simple file monitor setup that watches one file so I get notified when the contents of that file changes, added, or deleted. But when the file gets deleted I never get notified when it gets added back. Here is a snippet of my code: String…
darrickc
  • 1,872
  • 6
  • 27
  • 38
1
vote
1 answer

How to configure Commons VFS to automatically detect gz files

Our application is using Commons VFS to read various types of files. We use the automatic file type detection VFS provides, via its file extension mapping. The problem: VFS misclassifies gz files (ie. files whose name ends in .gz) as regular files,…
GreenGiant
  • 4,930
  • 1
  • 46
  • 76