Is there a POSIX pathname that can't name a file?
Fresh3 days ago
Mar 15, 20262549 viewsConfidence Score0%
0%
Problem
Are there any legal paths in POSIX that cannot be associated with a file, regular or irregular? That is, for which cannot succeed? Clarification #1: pathnames By "legal paths in POSIX", I mean ones that POSIX says are allowed, not ones that POSIX doesn't explicitly forbid. I've looked this up, and …
Error Output
test -e "$LEGITIMATEPOSIXPATHNAME"
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Canonical Fix
Unverified Fix
New Fix – Awaiting Verification
Fix for: Is there a POSIX pathname that can't name a file?
Low Risk
Testing for a filename with the null character in it should always fail. POSIX reserves '/' and null from filenames. This is sensible: one is the directory separator, and one is a string terminator. To support that point, Wikipedia says ext2, ext3, …
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix