Questions tagged [file-system]
Use this tag for reviews of code that performs file system operations, such as creating, deleting, renaming, moving, copying, reading, and writing files.
743 questions
3
votes
5
answers
636
views
List folders with size
This code below aim to listing all folders in one directory and get size of each in byte. It uses only pathlib module for that.
...
7
votes
4
answers
656
views
CSV handling class
I'm a hobby coder at best. I know enough to make helpful programs to assist me with day to day life and work (mostly with PHP/JS, some C#). I'm wanting to learn more about good coding practices. I ...
5
votes
4
answers
2k
views
A function that opens a CSV file
I'm working on a project that requires me to open CSV files. It must check that the file is open and then return it to main. I've written a function to do so and would like to know how it looks, if ...
2
votes
1
answer
140
views
ds (directory switcher): a *nix program for tagging directories with (short) tags and switching between them via tags
Repo
The complete program: GitHub repository
How it works
After you have cloned the above repository, change directory inside it and type make in order to compile ...
8
votes
1
answer
619
views
Shared-Memory Queue Implementation in C
Recently I am working on implementing a shared-memory based IPC message queue in C programming language on Linux system. A few design choices I've made include
The queue will have only 1 producer, ...
5
votes
4
answers
303
views
Swift for CLI tools (traversing directories, reading text files)
To compare ergonomics and performance of some languages for my hobby projects, I have written a simple lines of code counter in Swift, Go, Rust and Python. It scans a given directory tree for source ...
5
votes
2
answers
1k
views
An improved sample C++/WinAPI malware program for Windows (includes the program that uninstalls it completely)
(See the GitHub repository for a Visual Studio (2022) solution/projects.)
Description
This malware does nothing more than install/uninstall ...
7
votes
4
answers
2k
views
A sample malware program for Windows (includes the program that uninstalls it completely)
Intro
This time I was in the mood for the low level stuff. The entire repository is in GitHub. It includes the installer, the actual malware program, and the uninstaller that removes it completely ...
5
votes
1
answer
140
views
File system regex searcher
This is my first Rust project (I'm primarily a C guy). I want to know if my code is properly idiomatic (Rusty?). Also, are there any inefficiencies?
The code defines an iterator (...
12
votes
3
answers
1k
views
Simplified simulation of Unix "ls" command made using C++ std::filesystem library
I have just implemented this while getting acquainted with the std::filesystem library.
On input from console, the program accepts two arguments: ...
9
votes
3
answers
630
views
Parsing SFV files to extract and store the hashes
Similar to the class for the RAR file, now a class to extract and store the hashes from SFV files.
Though this was considerably easier, there has been some code reorganisation: there is now an ...
7
votes
3
answers
319
views
lndir shell function - hardlink two directories
The code works, but I could use help testing it more comprehensively and double-checking that everything I'm doing makes sense, and that all the options can coexist with each other. I'm running into ...
11
votes
6
answers
1k
views
fsize: A Command-Line Tool for Checking File Sizes
I have created a cross-platform CLI tool to quickly retrieve file size and present it to the user in different units of data. The whole program is written in C and for Windows Win32 API is used to ...
9
votes
3
answers
1k
views
Getting information about a RAR file's content
The first lines of the rarpath module (see here for context, the rest is not used here):
...
5
votes
2
answers
231
views
Sorting file names of a RAR split archive (v3 and v5)
This simple task of sorting a list of related RAR files of a split archive turned out to be more cumbersome than expected, since there are two versions of the RAR naming scheme, v3 and v5.
v3 is like ...