Proposal: System.FilePath: current directory should be ".", not ""

Duncan Coutts duncan.coutts at googlemail.com
Mon Nov 16 14:45:37 EST 2009


On Mon, 2009-11-16 at 03:20 -0500, wren ng thornton wrote:

> To think about why this distinction is helpful, consider where all we
> may want to attach the paths/trees we're creating. The two obvious
> places are / and . but there are other options too. Most programs
> support some notion of a $PATH variable or allow flags to specify the
> target directory for reading or writing.

This is a good point. Once you've got a search $PATH of some sort then
"./foo" and "foo" are actually different. "./foo" is a complete path and
refers to the file (or directory) foo in the current directory while
"foo" is an incomplete path that the function will try to complete by
looking for a file in each of the search directories.

So under a complete/incomplete distinction, a function like exec takes
Either Complete Incomplete, where the incomplete ones get the search
path treatment and the complete ones do not.

Duncan



More information about the Libraries mailing list