This is a terminology question.
Say you have a path like C:\foo\bar\MyFolder\
foo
, bar
, and MyFolder
are all individual directories, also known as folders, right? And they're arranged in a hierarchical directory tree, right?
However, the full path C:\foo\bar\MyFolder\
may also be referred to as a directory. For example, in C# there's a method called Directory.GetDirectories()
that returns directories in full path form.
Is there an unambiguous way to refer to the individual items in the path (foo
, bar
, and MyFolder
) that couldn't also mean the full paths ending in those items (C:\foo\
, C:\foo\bar\
, and C:\foo\bar\MyFolder\
)? I mean a word like directory or folder that means only the first thing and can't mean the second.
path
to mean the full path, and a file/directoryname
to mean the last component of the path, but whether you can rely on this to be universally understood is another matter. If you are writing anything of some length, you can always define your terms at the head of your piece.