Chdir problem
Fairlight
fairlite at fairlite.com
Wed Sep 1 18:03:25 PDT 2004
Only Kenneth Brody would say something like:
>
> Actually, no translation is done or needed, as Windows works just fine with
> forward slashes.
Indeed it does.
> I'm not sure which part of the name changes, since your arrows point to the
> path separator. I'll assume for now that "macy" is the part that changes.
> Adjust this as needed.
The joys of proportional fonts in email. :-/
> Use opendir/@dirlist/closedir to read everything in the "c:/edata/Geis-A"
> directory. You can then build the fill path and use EXISTS() to see if the
> file "c:/edata/Geis-A/"{name{"/ANSI/997/all/997.rpt" exists. If it does,
> you can then use @FSTAT[] to check the modification date.
Problem being, what if someone sticks a file in c:/edata/Geis-A instead of
a directory? What -exactly- will fP's opendir do? Based on opendir(3),
which I assume you're basically wrapping, they return a NULL. What does fP
do in this context?
For that matter, what does fP's open() do if you try to open a directory?
:) I've seen a variety of behaviour. vim will actually give you the list
of files in the directory to edit, for example.
Is there any way in fP to safely distinguish between file and directory? I
actually need to know this for something someone wants written--technically
I could live without it and mandate, "No directories shall be present!" in
my case, but it would be nice to be able to bullet-proof it the way i'm
used to doing things.
And besides that, files get dumped in weird places sometimes. Someone
could dump a core in a directory where you expect only directories and it
wouldn't even be intentional, and half the people out there would never
even notice they'd done it. That's actually being generous, probably.
So I really don't like to make assumptions about what will and won't be
present.
mark->
--
Bring the web-enabling power of OneGate to -your- filePro applications today!
Try the live filePro-based, OneGate-enabled demo at the following URL:
http://www2.onnik.com/~fairlite/flfssindex.html
More information about the Filepro-list
mailing list