public function length()
    {
        $fs = FileSystem::getFileSystem();
        if ($fs->checkAccess($this) !== true) {
            throw new IOException("No read access to " . $this->path . "\n");
        }

        return $fs->getLength($this);
    }