This will then be a post on the current state of an electionjs project where the aim is to start making something that is at least starting to look like a file manager program. Like many of these examples thus far I will want to keep the bar low for now unless I do start to use this all the time, or people take interest or so forth. The main goal then is to just be able to navigate around folders, and then start a terminal window or alternate file manager at the current path. On top of that there is also getting this to work on the operating system that I use most of the time which for now are windows 10 and Raspberry Pi OS.
I have the source code for this project also up on Github.
In the preload file I will want to define a number of methods that I can use in my client system to get the contents of a current working folder. The idea here is that I will bee storing what the current working path is in the client system, but will need a number of methods here to make use of nodejs features that will allow me to get the contents of a current working folder. So then for this preload file I am once again using the context bride module to go about defining what the public API should be in terms of a fm global that I can use from the client system.
So then I am making use of a whole lot of nodejs built in module for this preload file then such as the os module to have a way to find out what platform this is running on, as well as having a way to quickly fine out where the home folder is for the system. I am also going to want to use many of the methods in the path module for this one as well of course as this is very much a project in which I will be dealing with that a whole lot. To help me read the contents of the current working folder I will of course need to use the read dir method of the file system module, and I will also want to use the file system module to get stat objects as well for sure. Also on top of all of this I will also want to have a way to run commands from my client system that will differ from one platform to another, so I will want to have the exec and spawn methods of the child process module at the ready as well for thous kinds of methods.
When it comes to the CSS for this project I have worked out a few things using a CSS Grid, which is a new thing for me. I am sure that there is a great deal more to write about when it comes to GRIDS and CSS, but for now I just have a basic something working okay when it comes to the div elements that I use to display a folder or file.
When it comes to the very basic idea of what I wanted to start with making this I all ready have that working well. All I wanted was a way to navigate around a file system and then start a terminal window, or start another file manager and that is it. I also wanted to work out some platform specific things while I was at it such as starting a Linux bash prompt window in a Linux system, and a command prompt window in a windows system. So with that aid because I set the bar so low I was able to get what I wanted working fast which is great. However when it comes to turning this into a major project that other people might like to use I of course would have a lot more work ahead of me with this. That seams to be the case with every electronjs example project that I have started thus far though. The most basic form of the project is easy enough to get up and running, but work will never truly be done with it if I choose to continue to support it.