Difference between revisions of "Path"
Line 1: | Line 1: | ||
− | A '''path''' is the general form of a computer file or directory name, giving a unique location of the file or directory in a file system. Paths point to their location using a string of characters signifying directories, separated by a delimiting character, most commonly the '''(forward) slash''' character, '''"/"''', or the '''backslash'' character, "\" | + | A '''path''' is the general form of a computer file or directory name, giving a unique location of the file or directory in a file system. Paths point to their location using a string of characters signifying directories, separated by a delimiting character, most commonly the '''(forward) slash''' character, '''"/"''', or the '''backslash''' character, '''"\"'''. |
==Absolute Path== | ==Absolute Path== | ||
Line 5: | Line 5: | ||
==Relative Path== | ==Relative Path== | ||
− | A '''relative path''' is a path relative to the current '''working directory'''. For example, if your working directory were '''/cis/www/academics/mcs/''', you could reference the '''mcs.cfm''' file without any | + | A '''relative path''' is a path relative to the current '''working directory'''. |
+ | |||
+ | ==Special Symbols== | ||
+ | '''One period''', '''"."''' references the current '''working directory.''' | ||
+ | '''Two periods''', '''".."''' references the parent directory above the working directory. | ||
+ | |||
+ | ==Examples== | ||
+ | Say you're in charge of the '''Smash Club''' website whose [[URL]] is <nowiki>http://www.gustavus.edu/orgs/smashclub</nowiki>. | ||
+ | |||
+ | |||
+ | /cis/www/test/index.cfm | ||
+ | |||
+ | For example, if your working directory were '''/cis/www/academics/mcs/''', you could reference the '''mcs.cfm''' file without needing to supply any further information about the parent directories. |
Revision as of 15:00, 19 September 2006
A path is the general form of a computer file or directory name, giving a unique location of the file or directory in a file system. Paths point to their location using a string of characters signifying directories, separated by a delimiting character, most commonly the (forward) slash character, "/", or the backslash character, "\".
Absolute Path
An absolute path (or full path) is a path that points to a certain location on a file system, regardless of the working directory. It is usually written in reference to a file system's root directory, for example: /cis/www/academics/mcs/mcs.cfm
Relative Path
A relative path is a path relative to the current working directory.
Special Symbols
One period, "." references the current working directory. Two periods, ".." references the parent directory above the working directory.
Examples
Say you're in charge of the Smash Club website whose URL is http://www.gustavus.edu/orgs/smashclub.
/cis/www/test/index.cfm
For example, if your working directory were /cis/www/academics/mcs/, you could reference the mcs.cfm file without needing to supply any further information about the parent directories.