Re: [Harbour] DIRECTORY() compatibility

2008-02-12 Thread Mindaugas Kavaliauskas
Hi, Przemyslaw Czerpak wrote: I know that parameter of of Directory() is passed to system function unmodified. And the question is a little delicate (not sure is the right english word to express what I mean), that's why I wanted to say it on mailing list before changing behavior on SVN.

Re: [Harbour] DIRECTORY() compatibility

2008-02-12 Thread Szakáts Viktor
Let's be compatible, but I maintain that CA-Cl*pper is fundamentally wrong here. It's a loss in functionality, plus it results in ambiguous file/dir interpretation, so maybe some Harbour level file find API would come handy for those who want to get file listing/data in an unobstructed way. Or a

Re: [Harbour] DIRECTORY() compatibility

2008-02-12 Thread Przemyslaw Czerpak
On Fri, 25 Jan 2008, Mindaugas Kavaliauskas wrote: Seems to me this rather goes to down to platform behavior, than being a bug in Harbour code itself. Harbour actually passes down the file spec to the OS filefind call, unmodified. Exact behavior for this case is also not described in detail

Re: [Harbour] DIRECTORY() compatibility

2008-01-28 Thread Mindaugas Kavaliauskas
Hi, Since directory(c:\path,d) returns an array of 1 element, my friend used directory(c:\path\,d) to get list of directory for years. He did it in Clipper, and after that he successfully did it in xHarbour. I've looked to xHarbour's code, they have code to mask platform dependent behavior:

Re: [Harbour] DIRECTORY() compatibility

2008-01-28 Thread Saulius Zrelskis
Hi, I've tested what strings are passed to DOS. The same results in directory(.../) and directory(.../*.*) function calls are obtained because Clipper adds *.* if last character is path sepatator. So, it's not a question of platform behavior, it's Clipper. Exactly, if there is no cDirSpec

Re: [Harbour] DIRECTORY() compatibility

2008-01-27 Thread Szakáts Viktor
Hi Paul, This is fine, but DIR command will probably do its own logic when it comes to processing and modifying passed filenames. I personally _always_ append an ending slash manually to avoid any confusion or to rely on the logic of the underlying systems, because: C:\entry could as well mean

Re: [Harbour] DIRECTORY() compatibility

2008-01-26 Thread Paul Tucker
Victor, MK I've just finished my test on linux. I do not have Harbour under ?? linux, but I've tried to analyze opendir() system call. opendir(/ ?? path/) gives listing of folder, so, I guess directory(/path/) ?? will also (but it can depend on our implementation). This made me a ?? stronger

Re: [Harbour] DIRECTORY() compatibility

2008-01-25 Thread Mindaugas Kavaliauskas
Hi, Seems to me this rather goes to down to platform behavior, than being a bug in Harbour code itself. Harbour actually passes down the file spec to the OS filefind call, unmodified. Exact behavior for this case is also not described in detail in the CA-Cl*pper NG. I know that parameter of