Re: File Module: $target in file:copy()

Hi Florent,

sorry for not responding earlier.

>   OK.  This should probably be explicited then, to be sure all
> implementations behave the same way.

I looked at the spec, and I think the overwriting of files is
mentioned in the spec. Do you have some short proposal on how to make
the text more self-explanatory?

>     file:copy('...', 'target/')

I would prefer to stick with the existing semantics. If we decide to
make the trailing slash a convention, we would have to clarify for all
functions in the spec. what happens if the query representation and
the reality on disk differs. As an alternative, we could decide to
make the slash semantics mandatory only for file:copy and file:move,
but this would require a reconsideration of all possible side effects.
Last but not least, the modification would break existing applications
based on the File Module, and I believe it’s pretty nasty to fix bugs
introduced by such a subtle change.

Christian

Received on Tuesday, 3 December 2013 10:40:38 UTC