I'm trying to come up with a name for a class that can represent both files and folders. Anyone know a word for this?
Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.
FileNode in previous projects, the other devs were able to guess what it did from the name. The
-Node part lets others know you're working with a tree.
As everything (except the root folder or root of a drive) is ultimately contained within a folder, you could just go for
FilesystemObject (as suggested by @FrustratedWithFormsDesigner in a comment) also sounds good.
It depends on the operating system and the file system. On Unix, a directory is just a special file, so the correct term would be file.
NTFS has a similar unifying concept, albeit much more complex than on Unix, called attribute.
Why don't you just call you class "FilesAndFolders" or do you have a character-limit for naming? Well I guess you could call all of them entities, so: "FileSystemEntity"