Newbie questions about Pliant
Working directory listing
How can I obtain a current directory (working dir) listing? |
Message posted by grings on 2005/11/17 18:31:10 |
The instruction:
var Array:FileInfo files := file_list "file:tests/" reduced
lists subdirectory of current directory.
How can I obtain a current directory listing?
|
Message posted by hubert.tonneau on 2005/11/17 18:44:53 |
var Array:FileInfo files := file_list "file:./" reduced would do it, but ...
This rather a side effect than anything else, so I recommend to avoid it.
Pliant is intended to work only with absolute path, so what you should do is write a function that returns the OS current directory as a valid Pliant path, then use it as the 'file_list' argument.
Basically, Pliant currently does not translate the Unix current directory notion, because I find it evil (shell related).
|