createfile - How to create empty folder in java? -


possible duplicate:
how create folder?

i tried use file class create empty file in directory "c:/temp/emptyfile". however, when that, shows me error : "already made folder temp". otherwise, won't create 1 me.

so, how literally create folders java api?

looks file use .mkdirs() method on file object: http://www.roseindia.net/java/beginners/java-create-directory.shtml

// create directory; non-existent ancestor directories // automatically created success = (new file("../potentially/long/pathname/without/all/dirs")).mkdirs(); if (!success) {     // directory creation failed } 

Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -