From: Nicolas C. <war...@fr...> - 2003-11-15 01:06:33
|
> > let def_sep =3D (if windows then "\\" else "/") > > > > exception Cannot_up > > exception Invalid_path of string > > > > let to_string =3D function > > | [] -> "" > > | [x] when x =3D=3D def_sep -> def_sep > > | p -> > > String.concat def_sep (List.rev p) ^ def_sep > > Is there a reason not using Filename module? > The path is actually not using any filename. it's only the directory part which is manipulated. The only thing is that once the path is converted into a string, you can safely add a filename at its end. Nicolas Cannasse |