G
gmtonyhoyt
CBFalconer said:Now you are getting somewhere. Does the char set apply to paths,
and what constitutes a path? Does the presense of a '\' or '/'
define the system and thus the path portions? How, if at all, is a
MsDos disk identifier to be translated to or from?
The character set requirements do not apply towards paths. What is
path is dependant on the operating enviorment. For unix
(solaris/linux) it's everything before the last / if one exists. In
the MS standard (windows/dos) it's everything before the last \ if one
exists. All else, it's the complete length of the string. Now, how
exactly you define what is a unix enviorment, and what's a ms standard
one, is not always easy to determine. So I'm kind of purposefully
leaving it vauge here since I myself am not sure how best to interpret
this.
Now MsDos, as mentioned before and if correct, may normaly allow file
specifications such as "A:myFile.ct". Well that's fine but I think for
now, I want to enforce that the \ has to exist. Hence, the above will
be suitablely declared an invalid path in my application, only because
it's not a necessary detail that may add additional complexity to
what's intended to be a simple application.
As for example vi breaking my second requirement, I should then add
an additional note to rule two and that is, "if the file ends
exclusively in a period, that period will be striped before the final
'.out' extension is applied." or something that explains my intention
really. Any file that does not end with '.ct' plainly just gets '.out'
tacked on the end, while files ending with a '.' also get it replaced
with '.out' as if it where a '.ct' instead. A filename consisting of
just a '.' are not valid. And no wild card characters, but I think
that's covered in the third rule.
Sorry for the snotty last statement, I just didn't realize how
complicated this really needed to be. Again, all I was asking was, is
there really a way to just change a filenames extension in a unix/dos
enviorment. It didn't need to be complex, I wasn't sure if it wasn't
something obvious and done before and I just needed pointing to in the
right direction.
Tony