I'm trying to build a reactjs based web application to manage files on my local machine. my code is currently based off of this project https://github.com/knyzorg/simple-file-explorer which uses WebSockets to view files, my question is:
is it possible to send commands to modify file (change the name, move, or delete) that are saved to my computer?
don't necessarily need the solution, just a point in the right direction (though a solution would be cool to if you have one).
This is a pretty broad question.
No, the browser does not allow (for good reason) access to your local filesystem via Javascript. If it did, any website could access and modify your files! It would be a security nightmare.
Using server-side Javascript (via NodeJS), one is able to access the local filesystem of the server the script is hosted on via the fs module. This appears to be what the project you've linked to is doing - using React as a GUI (we might call it a 'front-end') for a NodeJS service that modifies a local filesystem (we might call it a 'back-end').
I'm knyzorg from GitHub (the author of the linked repo). It is definitely possible to send commands to manipulate the files. All you would need to do is add new commands inside the switch here and implement calls to them on the front-end.
The project uses ionotify to synchronize the state with the client. This means that the server will push the updates to the client as they happen, such that you would only need to implement the functionality to modify the file-system without worrying about updating the client in any way.
This was entirely a toy project, I am surprised to find it referenced here. Feel free to write me an email if you have any questions about the project's specifics.