4

I'm trying to name an object that can be a file or a directory. What's the correct terminology for this?

I've considered

handle -> rejected, object is not a handle

address -> rejected, object is not an address

object -> rejected, too generic, should be better terminology

When I say "object" in my first sentence, I'm specifically talking about a <div> in an HTML DOM, but it could be anything.

To put my question a different way, what's the parent word of the children "file" and "directory"? e.g. a foo can be a file, or a directory.

Ben
  • 54,723
  • 49
  • 178
  • 224

4 Answers4

4

I've heard the phrase "file system object", although it's painful to say :)

user541686
  • 205,094
  • 128
  • 528
  • 886
  • Ahh I'm glad someone understood my question. Agreed, difficult to say, but it's a start! :) Maybe "FSO" – Ben Jul 29 '11 at 03:56
  • It's funny because a directory is a file and a file is a file.... its all files 0_0 – Jesus Ramos Jul 29 '11 at 03:57
  • @Jesus - that's almost an answer in itself, just call everything a file. :/ – Ben Jul 29 '11 at 03:58
  • Yeah but the word association will make it OH SO CONFUSING to anyone working on that code, inode works pretty well and so does FSO, I would prefer FSO though because it's a tad more descriptive and inode usually refers to hard drive data/metadata (at least for me). – Jesus Ramos Jul 29 '11 at 04:00
3

In Unix we call any file and directory an inode, since a file is not many different from a directory in binary representation.

Oh Chin Boon
  • 23,028
  • 51
  • 143
  • 215
3

So just for reference Java has a File class that can be a directory or a standard file. Basically treating a directory as a special case of a file. java.io.File class

Also, you could go old school and just name it AbstractFile.

Kevin S
  • 2,713
  • 24
  • 31
1

In Unix, everything -- both a directory and a file -- is a file.