Forum und email
touch

touch

(PHP 3, PHP 4, PHP 5)

touch -- Nastavit čas změny souboru

Popis

bool touch ( string filename [, int time [, int atime]] )

Pokusí se nastavit čas změnu souboru filename na time. Pokud filename není přítomen, použije se aktuální čas.

Pokud tento soubor neexistuje, vytvoří se.

Při úspěchu vrací TRUE, jinak FALSE.

Příklad 1. Ukázka touch()

if (touch ($FileName)) {
    print "$FileName modification time has been
           changed to todays date and time";
} else {
    print "Sorry Could Not change modification time of $FileName";
}