Questions tagged [mkdirs]

87 questions
1
vote
0 answers

Android : mkdir() /mkdir() returning false on Secondary External Storage

I am trying to create a directory in my Seconday External Storage(SD Card) but mkdir() returns false. I have provided as the necessary permissions,the App is targeting API 29.
1
vote
0 answers

Mkdirs failed to create hadoop.tmp.dir

I have upgraded from Apache Hadoop 0.20.2 to the newest stable release; 0.20.203. While doing that, I've also updated all configuration files properly. However, I am getting the following error while trying to run a job via a JAR file: $ hadoop jar…
labrassbandito
  • 535
  • 12
  • 25
1
vote
1 answer

Java File mkdirs() returns true but does not create folder under load

I am facing issue with File.mkdirs(). I am creating few hundred folders in parallel, but seems like few times, this mkdir() api returns true but folder wasn't really created(java 1.8). I have pasted my sample code below, any ideas? My Sample code…
Sathish Kumar
  • 313
  • 2
  • 15
1
vote
1 answer

How can I prevent Hadoop's HDFS API from creating parent directories?

I want HDFS commands to fail if a parent directory doesn't exist when making subdirectories. When I use any of FileSystem#mkdirs, I find that an exception isn't risen, instead creating non-existent parent directories: import java.util.UUID import…
erip
  • 16,374
  • 11
  • 66
  • 121
1
vote
1 answer

How to create dir with special characters in Android

I need to create a folder named .ext.maps_common@transit etc. (untar archieve at other folder), I tried to use mkdir (), mkdirs (), trailing slash at its end and so on, but with no results. My final code is quite simple: File dir = new File…
Acuna
  • 1,741
  • 17
  • 20
1
vote
3 answers

Android mkdirs() doesn't work

I'm trying to generate a folder with my android application in my phone storage (not on the sdcard) but my mkdirs() is not working. I have set the android.permission.WRITE_EXTERNAL_STORAGE in my manifest and use this basic code : File…
N. Remon
  • 11
  • 1
  • 2
1
vote
1 answer

Bash create directories recursively without last

How can I ensure that intermidiate components exist? Something like mkdir -p {} but without last component?
ArekBulski
  • 4,520
  • 4
  • 39
  • 61
1
vote
1 answer

Assign output of mkdir command to variable

I am trying to assign the output of mkdir command to a variable. So I can use the directory further. -bash-4.1$ pwd /user/ravi/myscripts/tmpdata -bash-4.1$ OUTPUT=$(mkdir tmpbkp.`date +%F`) -bash-4.1$ ls | grep tmp tmpbkp.2017-04-06 -bash-4.1$ echo…
Ramineni Ravi Teja
  • 3,568
  • 26
  • 37
1
vote
0 answers

Android does not create a directory sdcard

I have already read many similar questions, but I could not find a solution to the problem. At first glance, I'm doing everything right, but the directory creation does not work for API 17 and low. Manifest
user233804
  • 53
  • 1
  • 8
1
vote
3 answers

Findbugs "Method ignores exceptional return value" java.io.File.mkdirs()

I have the following code in my app: final File f = new File(path); try { boolean folderCreated = f.mkdirs(); // if dir wasn't created this time, and doesn't exist if (!folderCreated && !f.exists()) { throw new…
Tiksi
  • 471
  • 1
  • 6
  • 15
1
vote
2 answers

Android MKDirs() not working for me - NOT EXTERNAL Storage

I have read over the various other postings on this and have not yet found an answer that is working for me. They have been discussing the use of External Storage and I need to use 'default' (internal) storage. I have a very simple routine in one…
Dhugalmac
  • 554
  • 10
  • 20
1
vote
1 answer

os function to both join directories and create them?

Currently if I want to specify and create a new directory, I'll do: newPath = os.path.join(oldPath,"newfolder") if(not os.path.exists(newPath)): os.makedirs(newPath) I'm wondering if a pre-packaged os function (or in other package) exists to do…
user2763361
  • 3,789
  • 11
  • 45
  • 81
1
vote
2 answers

Java mkdir() won't write directory for a string object, but does for a string enclosed in quotes

I'm running into a very frustrating error on what was supposed to be a very simple script (I know java may not be the best for scripting, but here I am). Anyway, I'm pulling names of printers from a csv file, and then I'm trying to create a folder…
SRansom
  • 337
  • 2
  • 3
  • 6
1
vote
1 answer

Can't create file. mkdirs() Always return false

I have that code, but I can't create file. configFile.getParentFile().mkdirs(); return false. That works some time ago, I just export my project and that stop work without any reason. File configFile = new…
user2250333
  • 133
  • 3
  • 17
0
votes
0 answers

How can I make a directory in Android?

When I use the method mkdirs() in Android Studio I get this runtime error Got a deoptimization request on un-DE optimizable method Boolean libcore.io.Linux.access(java.lang.String, int) Can anyone solve it? I wanted to make one directory in the…
ebrahim
  • 1
  • 1