Straw poll extensions?
-
I am surprised by the results of straw poll. I voted that "." was part of the extension. How else would you know it was an extension? I don't get it.
"A little time, a little trouble, your better day" Badfinger
-
I am surprised by the results of straw poll. I voted that "." was part of the extension. How else would you know it was an extension? I don't get it.
"A little time, a little trouble, your better day" Badfinger
Nope, just delimiters which are added when the path/name is formatted as a string for a particular purpose, primarily as aids to human readability. The delimiters do not exist in the file system itself -- definitely not in FAT at least, and probably not in any others. If someone has first name John and last name Smith, you may see it expressed as a string as "Smith, John" -- the comma is not part of either name, it is just an artifact of that particular formatting. Asking which name it is part of is nonsensical. And other purposes may require other formattings, such as:
<Name First='John' Last='Smith' />
The situation is more obvious with all the various ways people format dates and times within their cultures. If you split the parts of the path/name into substrings, one substring per part of the full path/name, then there is no longer any need for the delimiters. A UNC path to a file may be:\\SMITH\COMMON\Data\Today\Myfile.dat
while on OpenVMS I may refer to the same file as:SMITH::COMMON:[Data.Today]MyFile.dat
It just formatting for a particular purpose. -
Nope, just delimiters which are added when the path/name is formatted as a string for a particular purpose, primarily as aids to human readability. The delimiters do not exist in the file system itself -- definitely not in FAT at least, and probably not in any others. If someone has first name John and last name Smith, you may see it expressed as a string as "Smith, John" -- the comma is not part of either name, it is just an artifact of that particular formatting. Asking which name it is part of is nonsensical. And other purposes may require other formattings, such as:
<Name First='John' Last='Smith' />
The situation is more obvious with all the various ways people format dates and times within their cultures. If you split the parts of the path/name into substrings, one substring per part of the full path/name, then there is no longer any need for the delimiters. A UNC path to a file may be:\\SMITH\COMMON\Data\Today\Myfile.dat
while on OpenVMS I may refer to the same file as:SMITH::COMMON:[Data.Today]MyFile.dat
It just formatting for a particular purpose.I prefer: SMITHCOMMONDataTodayMyfiledat without any delimiters. Forces the file system to use black magick.
-
I prefer: SMITHCOMMONDataTodayMyfiledat without any delimiters. Forces the file system to use black magick.
Why limit yourself to printable characters? There must be some non-printable Unicode characters that are acceptable to the file-system. :)
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
-
That's the point :-\
-
Why limit yourself to printable characters? There must be some non-printable Unicode characters that are acceptable to the file-system. :)
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
-
Why limit yourself to printable characters? There must be some non-printable Unicode characters that are acceptable to the file-system. :)
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.
Why to use characters? You can directly use 1s and 0s :rolleyes:
M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.
-
I am surprised by the results of straw poll. I voted that "." was part of the extension. How else would you know it was an extension? I don't get it.
"A little time, a little trouble, your better day" Badfinger
I voted it was not part of the extension based on the old 8.3 filename standard. Also when describing a file I would say 'It's a PNG' rather than 'It's a .PNG' The first time I used Path.GetExtension() I was wrong about what it returns. I suspect they applied the same rules to filenames as they did to TLDs (.COM, rather than COM) etc. Oh well, no big deal. Technically it is part of the filename, but so is the extension. The bit before the last dot is the base filename. All in all, file extensions are a bit of a head-scratcher. Having file metadata as part of the filename is plain wrong.
-
I am surprised by the results of straw poll. I voted that "." was part of the extension. How else would you know it was an extension? I don't get it.
"A little time, a little trouble, your better day" Badfinger
It is part of neither the name nor the extension. It is a delimiter, based on a format. You might as well ask whether the decimal point is part of the whole number or the fractional of a floating-point value. It is part of neither and its very existence is merely due to the application of a format. For example
100.5
is just one way of formatting that particular value, with some others being:100,5
,100 + 1/2
,1.005E+2
. -
It is part of neither the name nor the extension. It is a delimiter, based on a format. You might as well ask whether the decimal point is part of the whole number or the fractional of a floating-point value. It is part of neither and its very existence is merely due to the application of a format. For example
100.5
is just one way of formatting that particular value, with some others being:100,5
,100 + 1/2
,1.005E+2
.*nix file systems don't really have a concept of an 'extension', the way FAT and numerous other file systems have. A file named 'source.c' has an eight character file name, every character represented in the name field, including the dot. Because so many other file systems have an explicit 'extension', 'type' or whatever it is called, field, even *nix people have started referring to the '.c' as the extension. Technically, it isn't. It is all part of the file name. If your *nix application wants to split up the file name to two pieces and call the second piece the 'extension', your code must search for the (last) dot - which is certainly present in the file name. The file system does not see it as a separator, but as a name character.
-
It is part of neither the name nor the extension. It is a delimiter, based on a format. You might as well ask whether the decimal point is part of the whole number or the fractional of a floating-point value. It is part of neither and its very existence is merely due to the application of a format. For example
100.5
is just one way of formatting that particular value, with some others being:100,5
,100 + 1/2
,1.005E+2
.