Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #788 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

FilePath refers to toNative in docs, should be native

Reported by: Deewiant Assigned to: kris
Priority: normal Milestone: 0.99.4
Component: IO Version: trunk
Keywords: Cc:

Description

The FilePath? documentation speaks of a "toNative" method which should be used to convert paths to their OS-native representation. Only a "native" method exists, and is meant.

Since "native" mutates the instance, why not call it "toNative"?

Change History

11/26/07 13:15:19 changed by larsivi

  • milestone set to 0.99.4.

11/26/07 14:04:35 changed by Deewiant

It seems that in Changeset 2890 FileConst?.PathSeparator? changed from '\\' to '/' on Windows, as well. If it's intentional that all paths on Windows use '/', why do we even have a FilePath?.native method in the first place?

11/27/07 01:18:34 changed by kris

because some usage of Win32 path still requires '\' instead of '/'. Working with the cmdline, for example. Keinfarbton made some notes on this in a related ticket. Also, see the bottom of the main Tango wiki page

11/27/07 09:15:13 changed by larsivi

I think the real question here is why PathSeparator for Windows is /. Probably there should be a NativePathSep constant.

12/02/07 17:54:52 changed by kris

  • status changed from new to closed.
  • resolution set to fixed.

the methods called path, file, name, suffix etc all mutate the internals. On the other hand, toString() does not :)

Doc changed