A simple C++ program that displays information about files and folders.
Go to file
2024-10-17 17:57:59 +03:00
.gitignore Initial commit 2024-08-20 19:39:18 +02:00
archives.h Add archives.h 2024-10-16 18:46:18 +03:00
configure change configure back T-T 2024-10-17 17:56:16 +03:00
LICENSE Update LICENSE 2024-08-23 20:32:10 +03:00
main.cpp Update all the files 2024-10-17 17:47:44 +03:00
Makefile Add archives.h 2024-10-16 18:46:18 +03:00
mime.cpp Fixed all the errors :( 2024-10-17 16:48:33 +03:00
README.md Update README.md 2024-10-17 20:12:46 +05:30

C/C++ CI

fileinfo

A simple C++ program that displays information about files and folders.

Contents

Installation

If you want the program to detect the file type more accurately, install libmagic-dev through your package manager, or with the ./configure command
Then, compile the source code.

make

Or, if you haven't installed libmagic-dev:

make nomime

And finally, copy that executable to /usr/local/bin folder. (not required)

sudo cp fileinfo /usr/local/bin/

Usage

./a.out [args] filename ...
Args:
	-A  Output absolute path
	-E  Do not show emojis

Example

pavlik@pavlik-MacBookPro9-2:~/rgb-terminal$ ls
LICENSE  main.c  README.md
pavlik@pavlik-MacBookPro9-2:~/rgb-terminal$ fileinfo main.c  # Single file
📝  main.c:
    Name: main.c
    Type: Text
    MIME: text/x-c
    File size: 10.1 KB or 9.9 KiB (10110 bytes)
    Permissions: -rw-rw-r--
pavlik@pavlik-MacBookPro9-2:~/rgb-terminal$ fileinfo main.c -A  # Single file with argument
📝  main.c:
    Name: main.c
    Type: Text
    Absolute path: /home/pavlik/rgb-terminal/main.c
    MIME: text/x-c
    File size: 10.1 KB or 9.9 KiB (10110 bytes)
    Permissions: -rw-rw-r--
pavlik@pavlik-MacBookPro9-2:~/rgb-terminal$ fileinfo *  # All files in this directory
📝  LICENSE:
    Name: LICENSE
    Type: Text
    MIME: text/plain
    File size: 1.2 KB or 1.2 KiB (1211 bytes)
    Permissions: -rw-rw-r--

📝  main.c:
    Name: main.c
    Type: Text
    MIME: text/x-c
    File size: 10.1 KB or 9.9 KiB (10110 bytes)
    Permissions: -rw-rw-r--

📝  README.md:
    Name: README.md
    Type: Text
    MIME: text/plain
    File size: 173 bytes
    Permissions: -rw-rw-r--
pavlik@pavlik-MacBookPro9-2:~/rgb-terminal$ fileinfo .  # Current directory
📁  rgb-terminal/:
    Name: rgb-terminal/
    Type: Folder
    MIME: inode/directory
    Contents:
        Normal: 3 files and 0 folders.
        Hidden: 0 files and 1 folders.
    Permissions: drwxrwxr-x

Coming soon

  • Created, last modified and last opened dates.
  • Extensions
    • Disk partitions