Ben
Ben

Reputation: 57277

What is the word that means "directory" or "file"?

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.

Upvotes: 5

Views: 1029

Answers (4)

user649198
user649198

Reputation:

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

Upvotes: 1

Kevin S
Kevin S

Reputation: 2753

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.

Upvotes: 3

HJW
HJW

Reputation: 23443

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

Upvotes: 3

user541686
user541686

Reputation: 210603

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

Upvotes: 5

Related Questions