Hi,

Currently the way to get filename from File node is to str() that File.
That's quite shady API, especially if used in function like:

    def convert(node):
        return str(node).replace('\\', '/')

I mean you have no idea what types of node are expected and why
there is slash escaping. The str(node) can return anything and
works on any types of nodes.

So, there is undocumented method File.rfile() with the path.
http://www.scons.org/doc/HTML/scons-api/SCons.Node.FS.File-class.html#rfile
Which contains os specific path and it is used for example in
https://github.com/wesnoth/wesnoth/pull/481/files

The questions.
1. Why it is called rfile?
2. Should it be documented?
3. What should be the proper API to get path info for File node?
4. What is the proper API to convert paths to system-specific and to
canonical (forward slash) form?
-- 
anatoly t.
_______________________________________________
Scons-dev mailing list
[email protected]
https://pairlist2.pair.net/mailman/listinfo/scons-dev

Reply via email to