classes/phing/system/io/PhingFile.php
public function setReadOnly()
    {
        $fs = FileSystem::getFileSystem();
        if ($fs->checkAccess($this, true) !== true) {
            // Error, no write access
            throw new IOException("No write access to " . $this->getPath());
        }

        $fs->setReadOnly($this);
    }
public function setReadOnly()
    {
        $fs = FileSystem::getFileSystem();
        if ($fs->checkAccess($this, true) !== true) {
            // Error, no write access
            throw new IOException("No write access to " . $this->getPath());
        }

        $fs->setReadOnly($this);
    }
public function setReadOnly ( ) { $ fs = FileSystem :: getFileSystem ( ) ; if ( $ fs -> checkAccess ( $ this , true ) !== true ) { // Error, no write access throw new IOException ( "No write access to " . $ this -> getPath ( ) ) ; } $ fs -> setReadOnly ( $ this ) ; }
Marks the file or directory named by this abstract pathname so that
only read operations are allowed.  After invoking this method the file
or directory is guaranteed not to change until it is either deleted or
marked to allow write access.  Whether or not a read-only file or
directory may be deleted depends upon the underlying system.

@throws IOException
Marks the file or directory named by this abstract pathname so that only read operations are allowed . After invoking this method the file or directory is guaranteed not to change until it is either deleted or marked to allow write access . Whether or not a read - only file or directory may be deleted depends upon the underlying system .