PHPDaemon\FS\File::datasync PHP Method

datasync() public method

Datasync()
public datasync ( callable $cb, integer $pri = EIO_PRI_DEFAULT ) : resource | false
$cb callable Callback
$pri integer Priority
return resource | false
    public function datasync($cb, $pri = EIO_PRI_DEFAULT)
    {
        $cb = CallbackWrapper::forceWrap($cb);
        if (!$this->fd) {
            if ($cb) {
                $cb($this, false);
            }
            return false;
        }
        if (!FileSystem::$supported) {
            $cb($this, true);
            return false;
        }
        return eio_fdatasync($this->fd, $pri, $cb, $this);
    }