I suggest to use the following approach in the naming:
filename
- file name:readme.txt
dirname
- directory name:mydir
filepath
- file name, including any path to it:path/to/readme.txt
dirpath
- directory name, including any path to it:path/to/mydir
As for the words file
and dir
themselves, I'd recommend not using them for paths at all, because: