Comments on How can I restrict filename characters?
Parent
How can I restrict filename characters?
Suppose I want to limit what characters are allowed in filenames. For example, I want file creation to fail if there is a \n
in the name.
Is there a way to enforce this?
If it matters, I prefer an answer for Arch Linux.
Post
A file can be created by the human user directly interacting on the laptop, or indirectly by a program.
In principle, you cannot detect statically all file creation calls in a software (even if you have access to its source code), because of Rice's theorem.
In practice, you could (with a lot of efforts) customize your user interface (e.g. graphical desktop, like GNOME) to limit in most (but not all) cases what the user is permitted to create interactively.
You could even (in theory) design your own operating system which has no files at all (but persistent objects). See the old Tunes project.
1 comment thread