Is it possible for a file f
that os.path.isfile(f)
and os.path.isdir(f)
both evaluate to false?
What would a third category be named in this case?
Szenario:
I have created a contentless file using touch
on ubuntu 18.04, which definitely is not a directory. Python (version 3.5) nevertheless returns false on isfile(f)
.
Edit: It turns out that the file indeed returned True, the earlier output was a small mistake in my code.
The question still remains as I thought about it this way:
I have a set (Set A) of all files in a directory.
I create a subset via isfile filtering (Set B).
I create a subsets via isdir filtering (Set C).
Would the union of B and C be equal to A?