Skip to main content

Questions tagged [fileutils]

FileUtils is a File manipulation utility from Apache Commons

-2 votes
1 answer
65 views

Cannot copy file to windows 11 file system - if you are running this code in the linux server

I'm doing a download from java apps running on linux. The following is the code: public void downloadCopyToFile(String filename, String outFilename) throws IOException { try { ...
Rusli Usman's user avatar
-1 votes
1 answer
69 views

Java - org.apache.commons.io.FileUtils.copyFileToDirectory(sourceFile, destination) is failing to copy file

private void copyFile() { try { String data = "C:\\Test_data\\My_Folder\\data"; String destination = "D:\\test\\CC"; File destDir = new File(destination)...
mayur patil's user avatar
0 votes
1 answer
59 views

Sorting files by created date using FileUtils Apache

Is there a way to sort files in a directory using FileUtils Apache? I wan't to sort the files by the date they are created... I have tried the following code: public String[] getPDFFiles (String dir) ...
Netrom's user avatar
  • 3
-2 votes
1 answer
181 views

Java : Convert an Inputstream string into file

I am trying to write a String (read from an InputStream) into a file. But when the output.pdf file is generated, it is corrupted. In real-world scenario, I am receiving a string as an input from ...
V.Aggarwal's user avatar
1 vote
0 answers
43 views

xUnit Jenkins Plugin "Cannot create directory"

I'm in the process of writing a declarative Jenkins pipeline as CI for a project. As part of it, I use GoogleTest and feed the generated xml file to an xunit call. It might be noteworthy that in ...
AnonA's user avatar
  • 11
0 votes
1 answer
149 views

Deleting all files & directories except those matching a given glob pattern

I have a list of all the files & directories that I need to delete, but I need to exclude all files/directories that match a given glob pattern. Any suggestions on how I can achieve this? I am ...
Thiccasa 69's user avatar
-1 votes
2 answers
154 views

How can i manage files in my host machine on Docker

I am using Docker on my Windows machine and i want to copy a directory to another directory in my Windows host. I have a Maven project that does this on Windows using org.apache.commons.FileUtils ...
Enes Yıldız's user avatar
0 votes
1 answer
1k views

Errno::ENOENT: No such file or directory @ dir_chdir

I have a model Report to export all the Pdf attachments done for the bills. I have other models Bill, Upload. Bill has many uploads Tech Stack used Ruby 2.5.8 Rails 5.0.7 Dummy Code require '...
siv rj's user avatar
  • 1,491
0 votes
1 answer
2k views

How to resolve java.io.IOException: The filename, directory name, or volume label syntax is incorrect

I have written a simple script to take the screenshot but it is giving java.io.IOException The filename, directory name, or volume label syntax is incorrect what's wrong with the code, or is it ...
Neel Chavan's user avatar
0 votes
1 answer
478 views

file_utils module import failing in colab

I am trying to run BertForSequenceClassification from within Google Colab. My notebook needs to import BertForSequenceClassification from modeling_readmission, but modeling_readmission.py itself ...
wdchild's user avatar
  • 51
7 votes
2 answers
508 views

Java | Attempting to delete files on a Windows machine results in "phantom files"

I'm trying to delete some files on a windows machine using apache commons-io's FileUtils.deleteDirectory method (The version of the commons library is 2.4). Said method eventually calls the "...
TwistedBOLT's user avatar
0 votes
0 answers
64 views

Problem with FileUtils.mkdir_p deleting folder contents

My "folder 3" contains "Folder 4A", but when I made a new folder within it, "Folder 4B", my "Folder 4A", and all it's contents got deleted. What is wrong with ...
user2012677's user avatar
  • 5,635
1 vote
2 answers
660 views

FileUtils write method does not work on Azure Databricks

I have troubles writing a file on my Databricks cluster's driver (as a temp file). I have a scala notebook on my company's Azure Databricks which contains those lines of code : val xml: String = ...
Karzyfox's user avatar
  • 339
0 votes
1 answer
2k views

how to create a utils.py module

I had a def hello() function in my home/file.py. I created a home/common/utils.pyfile and moved the function there. Then I imported it like this: from utils import hello and the import in my file ...
user avatar
2 votes
1 answer
615 views

FileUtils: Skips files that are already in destination and copy rest of the files

I am using the following method to transfer files between two directories using java. FileUtils.copyDirectory(sourceDir, destinationDir,fileFilter,false); But if a file with the same name is also ...
rizzanasking's user avatar

15 30 50 per page
1
2 3 4 5
16