[Gllug] PHP Guru's

Tethys sta296 at astradyne.co.uk
Mon Jul 19 08:39:29 UTC 2010


--------

salsaman at xs4all.nl writes:

>I don't know if this is of any use, but I wrote a C function to check free
>space for the volume containing a given directory (the directory is
>created temporarily if it does not exist).

Bleurgh! Why not just recursively try statvfs(2) ascending higher up
the directory tree until you find one that actually exists? No need to
create a temporary directory for that. But if you absolutely must create
a directory, can I introduce you to mkdir(2) and rmdir(2)?

Your use of system("/bin/mkdir ...") and system("/bin/rm ...") makes my
skin crawl :-)

Tet
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list