Learn how to make desktop applications out of the very same technologies used in web development.
Before creating the main.js and index.html files, we need to discuss the two process types available in Electron. They are fundamentally different and important to understand. Each of these two processes has a specific responsibility within the application.
We already learned that the renderer processes would display the UI of your application. It will load content and execute it within its own thread. Now we'll create our renderer index.html file inside the same directory where the package.json resides.
We’ll create user interface (UI) for our &qout;Duplicate File Finder" desktop app with HTML and style it witch css. It is a very simple interface, just a logo on top with Application name, version number and two button Add folder and Start search for controlling the app behavior.
Hash is a way to encrypt data into a fixed-length digest. This digest serves as a signature representing the original data that hashed. The various types of hashing algorithms are available in Node.js through the
In this tutorial, we’ll learn how to read, write, and append to files in a asynchronous and synchronous manner. We’re going to write a simple program that grab text from a file, and saves it in a new file. We’ll also learn how to read a dir in a synchronous manner recursively.
In this tutorial, we’ll learn how to read, write, and append to files in an asynchronous manner. We’re going to write a simple program that grab text from a file, and saves it in a new file. We’ll also learn how to read a dir in an asynchronous manner recursively.
Another way to access a file is
fs.open() function. Once a file is accessed, you can read data from it using
fs.read() function or write data to it using
Lean how to query the status of files using Node.js, returning information such as the file type, file owner, access permission file size, number of links, inode number and file birth, access, change and modify times.
A synchronous function blocks until it completes its operations. An asynchronous function returns immediately and the result is passed to a callback function.
So, if you have functionality that needs to wait on something, such as opening a file, retrieving data from the database, a web response, or other activity of this nature, then blocking the application until the operation is finished would be a major point of failure in a server-based application. The solution to prevent blocking is the event loop.
In this tutorial, we'll make an event driven file walker which will scan a directory tree asynchronously.
Now its time to extend our FileWalker module by adding the pause and resume functionality to make our Duplicate File Finder pausable and resumable. We’ll also add two methods filterDir and filterFile to filter out directories and files for inclusion or exclusion.
A child process is a process created by a parent process. Node allows us to run a system command within a child process and listen in on its input/output. This includes being able to pass arguments to the command, and even pipe the results of one command to another.