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?

closed as primarily opinion-based by gnat, user22815, enderland, user40980, Ixrec Sep 1 '15 at 0:13

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.


Consider FileNode or FileSystemNode.

I've used 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.

  • I prefer FileSystemNode, as FileNode sounds like it might be specific to files. – Brian Sep 17 '13 at 12:52

As everything (except the root folder or root of a drive) is ultimately contained within a folder, you could just go for FolderElement, although 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.

  • 1
    Although technically correct, I feel that most people would assume a class "file" is associated with documents, not folders. – Cavyn VonDeylen Jan 16 '13 at 17:27
  • 2
    Documents are yet another can of worms entirely. A single document may be split across multiple files and a single file may contain multiple documents. – Jörg W Mittag Jan 16 '13 at 17:39
  • 6
    I don't know what to call anything anymore. – Cavyn VonDeylen Jan 16 '13 at 17:45

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"

Not the answer you're looking for? Browse other questions tagged or ask your own question.