Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to create a client-side workspace-based app in Angular2?

I wish to create a client-side only app in Angular2 where the user is prompted to select a folder on his hard-disk as a workspace, meaning that files will be written by the app inside that folder. I want to know how that can be achieved or if it is even possible. Thank you in advance.

like image 430
vladek Avatar asked Nov 20 '25 01:11

vladek


2 Answers

No.

JavaScript, running in a web browser, outside of a browser extension, cannot write to the user's file system.

It can only read from files explicitly selected using a file input.

The closest you'll come to an exception is for internal browser storage areas such as localStorage.

like image 143
Quentin Avatar answered Nov 22 '25 15:11

Quentin


TL;DR no.

But you can use File and Directory Entries API which works only in Chrome and Firefox and is non standard.

And I do not recomend it to use this, same as the documentation says:

This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.

like image 39
tenhobi Avatar answered Nov 22 '25 15:11

tenhobi