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
0
votes
1 answer

Filter all files in any depth by file prefix inside a directory

I'm using Apache Commons VFS2.0 to access files both in a local file system and a remote file system. I'm trying to find a way to filter all the descendent files in any depth with FileType=File and has a given filePrefix with the file name. I was…
ThilankaD
  • 1,021
  • 1
  • 13
  • 24
0
votes
0 answers

Thread getting blocked while accessing cifs file

We are running our spring-boot application on azure environment using following config: os: centos-8 jdk: openjdk-java(TM) SE Runtime Environment (build 1.8.0_261-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.261-b12, mixed mode) file system:…
mcacorner
  • 1,304
  • 3
  • 22
  • 45
0
votes
1 answer

Commons VFS fails for different file extension

I am new to Commons VFS and am trying to understand how to open a nested archive. I found an example in the source code that deals with this. This test passes. @Test void testTGZ() throws Exception { FileSystemManager fsManager =…
Mark Sholund
  • 1,273
  • 2
  • 18
  • 32
0
votes
1 answer

Using Apache VFS Library Get File Size (Symbolic Link)

I utilize the Apache VFS library to access files on a remote server. Some files are symbolic links and when we get the file size of these files, it comes back as 80 bytes. I need to get the actual file size. Any ideas on how to accomplish…
0
votes
1 answer

Send SFTP file from database without actually creating a file

I want to send some data from the database. Currently our SFTP is set up like so (using the apache commons vsf2 library). try(StandardFileSystemManager manager = new StandardFileSystemManager()) File file = generateFileFromDatabase(); …
user2743227
0
votes
1 answer

How can I create and write to a CSV file in a remote, username and password protected location?

I have to create and fill a CSV file with some data, and then place it into the username and password protected remote location on a client's computer. I'm using apache-commons CSVPrinter to write the file. A scheduled job writes the file, but I…
mdenci
  • 297
  • 2
  • 6
  • 17
0
votes
2 answers

How to upload byte array using apache common vfs

I am stuck in uploading byte array using apache common vfs, below is the example uploading file using filepath, I googled but I am not getting the solution for file upload using byte array public static boolean upload(String localFilePath,…
pise
  • 849
  • 6
  • 24
  • 51
0
votes
1 answer

How to read the contents of a "FileObject" apache class object?

I am trying to read a file on a remote machine using org.apache.commons.vfs2. I am able to locate the file on that machine and store it into the FileObject class but I can't seem to find a way to read the contents of the file using that FileObject.…
Ritzies
  • 33
  • 1
  • 7
0
votes
1 answer

SFTP File Transfer not being received by client

We recently performed a new deployment of our system which included an upgrade of Apache Commons VFS from 1.1 to 2.0. Since the deployment our client has said they are no longer receiving a file that is generated by our system on a daily basis and…
mohammedkhan
  • 953
  • 6
  • 14
0
votes
2 answers

Convert UploadedFile (primefaces) to FileObject (Apache Common)

I'm uploading a file using primefaces components. public void handleFileUpload(FileUploadEvent event) { UploadedFile file = event.getFile(); } For the further progress of the application, I have a function given from a library that I…
0
votes
2 answers

How to get a list of files to be downloaded using HttpClient or Commons VFS?

I would want to know if there any another way to get a list of files to be downloaded from HttpServer,other than parsing the response using HttpClient. I would also like to know if Commonns VFS is a suitable alternative for this as I tried using…
0
votes
1 answer

Issue with Java FTP library Jsch

I am using Java 1.7 , jsch 0.1.54 and commons-vfs2 2.1. This is the code i am using : JSch.setConfig("kex",…
Gaetan56
  • 519
  • 2
  • 6
  • 17
0
votes
1 answer

SFTP file transfer using Apache Commons Vfs2

I am using Apache Commons VFS2 to upload a file to server. Below is the code for the same. I have all the credentials right. The code printed "File uploaded successfully" String as well. But, I could not find the file on server when i cross checked…
BIndu_Madhav
  • 577
  • 1
  • 8
  • 21
0
votes
1 answer

Find files in inner zipfile Commons VFS

Is it possible to use the FileObject::findFiles method or similar to search in ZIP files which are stored in a folder? Or do I have to open the zipfiles by myself? FileObject root = vfs.resolveFile(file:///home/me/test/vfsdir); // shows everything…
Vincent Wagner
  • 131
  • 1
  • 7
0
votes
1 answer

Virtual File System using scala or java

I'm working on the project where I need to store files in HDFS or S3 buckets. Problem is that I need to store each file with unique GUID. The application need keep track of the versions of the file and return the latest versions. I'm looking at…
Imtiaz Mirza
  • 591
  • 1
  • 7
  • 26