i would like to create a file in a folder (TestFolder) of web server. I will i get relative path of web server directory and how will i create my TestFolder in that directory.
currently i will create a folder in my local server but later i need to create a folder in test environment (server could be different on test environment)
The above code will create a folder
TestFolderand a filetestFIle.txtin the root directory of your web application.file.mkdirs()Creates the directory named by this abstract pathname, including any necessary but nonexistent parent directories. Note that if this operation fails it may have succeeded in creating some of the necessary parent directories.Returns:
trueif and only if the directory was created, along with all necessary parent directories;falseotherwiseHope this helps !