filesystem functions delayed

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

information one receives from is_dir() is out of date. In SuSE Linux 9.1
Kernel: 2.6.5-7.111 Apache/2.0.49, PHP Version 4.3.4. the following script:

        $r = is_dir ($d1);
        echo "isdir ( $d1 ) = $r";
        if (is_dir ($d1)) {
                $e = rename ($d1, $d2);
                echo "rename ($d1, $d2) $e";
        if (is_dir ($d2)) {
                echo "destination dir $d2 already exists";
                return (3);

leads to:

d1: /home/zbyszek/people/1/15523
d2: /home/zbyszek/people/1/17904
isdir ( /home/zbyszek/people/1/15523 ) = 1
rename (/home/zbyszek/people/1/15523, /home/zbyszek/people/1/17904) 1
d1: /home/zbyszek/people/2/200
d2: /home/zbyszek/people/1/15523
destination dir /home/zbyszek/people/1/15523 already exists  !!!!!!!!!!!!

but the terminal shell says:

zbyszek@jane:~/people> ls 2/200 1/15523 1/17904
/bin/ls: 2/200: No such catalog
/bin/ls: 1/15523: No such catalog       !!!!!!!!!!!!!!!!!!!!!!!!!

obviously is_dir($d2) gives the wrong result. could somebody help me, please
  zbyszek lisiecki

Re: filesystem functions delayed

*** Zbigniew Lisiecki wrote/escribió (Tue, 10 May 2005 20:09:26 +0200):
Quoted text here. Click to load it

The correct term is "cached":

"Note: The results of this function are cached. See clearstatcache() for
more details."

-- Álvaro G. Vicario - Burgos, Spain
-- - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group

Site Timeline