sparse-file-creator is a small application written in NW.js (which is basically HTML for front-end and Node.JS for back-end), and it can be used to make multiple sparse (dummy) files for testing or "entertainment" purposes (yes, I find using this tool a bit entertaining).
- Create (multiple) sparse file(s) based on the defined settings
- The file name and size can be randomized, or defined using JavaScript based on the current index (from 0 to length - 1)
- Blazing-fast file creation because of
fs.ftruncate()(uses only one system call to create the sparse file (almost) instantly). Due to it being blazing-fast, you won't see the progress bar going up most of the time, although the progress bar actually exists.
As soon as your operating system supports NW.js and your disk's filesystem supports fs.ftruncate(), this application will likely work. If it doesn't work, consider re-checking your file system. I've tested it on:
- Arch Linux with ext4 and NTFS filesystem
- macOS with APFS filesystem
This is your destination. Just download the binary made for your current operating system.
Since this application uses NW.js, the building process is very easy to perform:
NW.js 0.72.0 is recommended because of it being the latest version supporting Windows 7 and 8.1. If you're using Windows 10, you can indeed download the latest version instead of older ones.
I'm doing this using PowerShell command line, but of course, you can do all of these things with respective GUI applications if you want.
Replace nwjs-v0.72.0-win-x64 in every command with nwjs-v0.72.0-win-ia32 if you're building the 32-bit version.
- Download NW.js binaries from the server:
32-bit
wget -O nwjs.zip https://dl.nwjs.io/v0.72.0/nwjs-v0.72.0-win-ia32.zip64-bit
wget -O nwjs.zip https://dl.nwjs.io/v0.72.0/nwjs-v0.72.0-win-x64.zip- Extract the downloaded
.zipfile:
Expand-Archive -Path nwjs.zip -DestinationPath .- Clone this repository:
git clone https://github.com/lv3-himeme/sparse-file-creator.git- Copy the source code into the NW.js folder:
Copy-Item -Path ".\sparse-file-creator\*" -Destination ".\nwjs-v0.72.0-win-x64" -Recurse -Exclude ".git*"- (Optional) Rename
nw.exetosparse-file-creator.exe:
Rename-Item -Path ".\nwjs-v0.72.0-win-x64\nw.exe" -NewName "sparse-file-creator.exe"Now you can run sparse-file-creator.exe (or nw.exe if you don't rename it) in nwjs-v0.72.0-win-x64 folder. Of course you can rename or compress the folder if you want.
NW.js 0.72.0 is also recommended for this OS to bring back macOS 10.15 support. Of course you can still download the latest version if you don't care.
Replace nwjs-v0-72.0-osx-x64 in every command with nwjs-v0.95.0-osx-arm64 if you're building the arm64 (Apple Silicon) version.
- Download NW.js binaries from the server:
wget -O nwjs.zip https://dl.nwjs.io/v0.72.0/nwjs-v0.72.0-osx-x64.zipFor arm64 (Apple Silicon), you need to download the latest arm64 version:
wget -O nwjs.zip https://dl.nwjs.io/v0.95.0/nwjs-v0.95.0-osx-arm64.zip- Extract the downloaded
.zipfile:
unzip -o nwjs.zip -d .- Create a new folder called
app.nwinnwjs.app/Contents/Resources:
mkdir nwjs-v0.72.0-osx-x64/nwjs.app/Contents/Resources/app.nw- Clone this repository:
git clone https://github.com/lv3-himeme/sparse-file-creator.git- Copy the source code to NW.js folder:
rsync -av --exclude=".git*" sparse-file-creator/ nwjs-v0.72.0-osx-x64/nwjs.app/Contents/Resources/app.nw/- (Optional) Rename
nwjs.apptosparse-file-creator.app:
mv nwjs-v0.72.0-osx-x64/nwjs.app nwjs-v0.72.0-osx-x64/sparse-file-creator.appNow you can run sparse-file-creator.app (or nwjs.app if you don't rename it) in nwjs-v0.72.0-osx-x64 folder, and of course you can rename or compress it if you want.
Replace nwjs-v0.95.0-linux-x64 in every command with nwjs-v0.95.0-linux-ia32 if you're building the 32-bit version.
- Download the latest NW.js binaries:
32-bit
wget -O nwjs.tar.gz https://dl.nwjs.io/v0.95.0/nwjs-v0.95.0-linux-ia32.tar.gz64-bit
wget -O nwjs.tar.gz https://dl.nwjs.io/v0.95.0/nwjs-v0.95.0-linux-x64.tar.gz- Extract the downloaded
.tar.gzfile:
tar -xzvf nwjs.tar.gz- Clone this repository:
git clone https://github.com/lv3-himeme/sparse-file-creator.git- Copy the source code to NW.js folder:
rsync -av --exclude=".git*" sparse-file-creator/ nwjs-v0.95.0-linux-x64/- Make the
nwfile executable:
chmod +x nwjs-v0.95.0-linux-x64/nw- (Optional) Rename
nwtosparse-file-creatorif you want:
mv nwjs-v0.95.0-linux-x64/nw nwjs-v0.95.0-linux-x64/sparse-file-creatorNow you can run sparse-file-creator (or nw if you don't rename it) in nwjs-v0.95.0-linux-x64 folder, and of course you can rename or compress it if you want.
- Bootstrap v5.3.3
- jQuery v3.7.1
- CodeMirror v5.65.18
You can view their respective license in the licenses folder.
This application is licensed under MIT License.
