Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Name of a path containing the complete file name?

For me, a path was always something that "walks the way to something", but without the "something".

Like a chicken following bread crumbs until it hits the target. But the target is not part of the path. That's what I believe.

So, example: C:/foo/bar = the path. C:/foo/bar/something.html = Path and the "Target".

Can someone tell me what are the correct terms here? How do I call such a path with file?

"Full path"? "Full qualified path"? "Path with File Name"? (not precise! "Path with File Name and Extension" ... way too long)

Sure there's a special name for this. Want to know! :)

like image 249
openfrog Avatar asked Jan 22 '10 17:01

openfrog


People also ask

Does a file path contain the file name?

Paths include the root, the filename, or both. That is, paths can be formed by adding either the root, filename, or both, to a directory.

What is the path of a file in computer?

Alternatively known as the pathname, the current path or path is the complete location or name of where a computer, file, device, or web page is located.


1 Answers

Nice chicken example... I think you mean absolute path

but, It doesn't matter what the path points to, be it a directory, file, device or otherwise

Wikipedia says:

A path, the general form of a filename or of a directory name, specifies a unique location in a file system.

It doesn't even require an extension, as other mechanisms work out the filetype.

  1. /foo/bar/file.txt = Absolute path
  2. /foo/bar = An absolute path to a directory
  3. ../foo = A relative path to a directory, from current directory
  4. ./file.txt = A relative path to a file, from current directory (Unix)
  5. file.txt = A relative path too

Also

Systems can use either absolute or relative paths. A full path or absolute path is a path that points to the same location on one file system regardless of the working directory or combined paths. It is usually written in reference to a root directory.

The distinction between files and directories isn't catered for with a path. A path is always a path to something, be it a file or a directory:

/a/b/c is the path to c regardless of what type (file, directory, device) the end point is.

Also checkout basenames

basename is a standard UNIX computer program, when basename is given a pathname, it will delete any prefix up to the last slash ('/') character and return the result. basename is described in the Single UNIX Specification and is primarily used in shell scripts.

like image 149
Aiden Bell Avatar answered Dec 01 '22 14:12

Aiden Bell