0

its possible to create folder or a file by using javascript pure with out using node.js ?

in my project, I want to create an web app can create a folders and files

3 Answers3

0

On the user's machine? You can't do this for security reasons. Imagine the possibilities if a web app could write to any arbitrary location!

What are you trying to achieve? Perhaps there's another way it can be done.

old greg
  • 799
  • 8
  • 19
0

With nodejs you can create folders and files on the server.

However if you are talking about having persistent data on client side, the best you can do would be to store information in the local storage, sessionStorage or Indexed db.

If you want to generate files that the users could download, it's possible (How to create a file in memory for user to download, but not through server?) but your app won't be able to read it afterwards.

user3252327
  • 617
  • 5
  • 9
0

you can use shell.js on linux server.

const shell = require('shelljs');
shell.mkdir(options, directory);
Azeroth
  • 11
  • 4