Re: ARIN Policy on IP-based Web Hosting
"Roeland M.J. Meyer" wrote:
everything to the right side of the final dot. Such as in "/etc/named.conf" the extension is "conf". A better example is "/usr/local/src/whois.1.9.0/readme.txt" where the extension is "txt".
True, in a literal understanding. But in the sense of "a part of the filename used to identify the format or purpose of the file content", it's not always correct. "extension" is a term that stems from the DOS days, when it was actually stored separately in the directory structure of the file system. Today, however, you find this information encoded into filenames in a wide variety of ways. Type information may be in the form of a prefix, a suffix, multiple prefixes, or multiple suffixes. It may be delimited by periods, dashes, other characters, or even by no characters at all. For example: conf.modules myarchive.tar.gz libstdc++-2-libc6.1-1-2.9.0.a kernel-headers-2.2.16-3.i386.rpm An "extension" is only one specific subset of the infinite number of possible ways that type information can be, and often is, encoded into filenames. Unfortunately, this creates the reality that any code which tries to deduce a file type from a filename will require a huge (and ever increasing) set of parsing rules (probably some form of regular expressions) in order to to the job properly. Even more unfortunately, the Windows world hasn't figured this out yet, and only looks at strings that follow a period at the end of a name. -- David
participants (1)
-
David Charlap