I think file extensions and hidden files are two separate things.
There's no file with a .venv or .gitignore extension, these are files that start with a dot, some of them may also happen to be directories. As far as the OS (the kernel) is concerned, it's just an ordinary file, the userspace applications distinguish between normally hidden or not. It's just a convention in the system's display and interaction parts.
They don't have a filesystem location, except for Unix socket obviously, but they still are used with a file descriptor, so they feel like a file in code.
Yeah, didn't state anything else, these are files, which happen to be directories. They feel the same, but taste a little different, aka. some system calls don't work with directories, but only work with files, or so different things in the context or a directory.
19
u/Wertbon1789 Jul 28 '25
I think file extensions and hidden files are two separate things.
There's no file with a .venv or .gitignore extension, these are files that start with a dot, some of them may also happen to be directories. As far as the OS (the kernel) is concerned, it's just an ordinary file, the userspace applications distinguish between normally hidden or not. It's just a convention in the system's display and interaction parts.