[GRASS-dev] Windows-style Pathnames

Glynn Clements glynn at gclements.plus.com
Thu Nov 2 21:21:19 EST 2006


Paul Kelly wrote:

> > For the above case, there should probably be a
> > G_is_directory_separator() function which determines whether or not
> > its argument is a directory separator on the host platform.
> 
> OK, I'm looking at this now. So on Windows that function would return true 
> for both '\\' and '/' being passed to it, and on Unix only for '/'?

Yes.

Also, look at Tcl's file(n) manpage for ideas for functions which
might be needed. Note that Tcl also uses c:/path/to/file syntax on
Windows in most cases, with "file nativename ..." being used if you
need an entirely native filename.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list