This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating New Folder  RSS feed

 
Jacob Steingart
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are creating, say, a text file called "file.txt" and you set the path to "folder/text" will the folder "folder" be created?

[EDIT] Never mind I figured it out
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Don't know. Have you tried it?
 
Jacob Steingart
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed I did, but alas, it didn't work. i'm still searching around to figure out how to make a folder. I'm trying to make a data storage thingy (that's what the professionals call it :P) that I can use for different programs. My basic plan is to have a single copy of this "data storage thingy" running on one computer. Any software that needs to use it could just dial it up with java.net and tell it to do something, i.e. make a table, make a 3d array, store a bit array, get some info, etc. It will be an interesting project, though useful.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The methods "mkdir()" (create a single directory) and "mkdirs()" (create a nested chain of directories) in java.io.File are the way to create "folders" in Java.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!