public function setAccessMode($permissions)
    {
        switch ($permissions) {
            case File::FILE_MODE_RW_POINTER_AT_END:
            case File::FILE_MODE_W_POINTER_AT_END:
            case File::FILE_MODE_R_POINTER_AT_BEGINNING:
            case File::FILE_MODE_RW_POINTER_AT_BEGINNING:
            case File::FILE_MODE_RW_TRUNCATE_FILE_TO_ZERO_LENGTH:
            case File::FILE_MODE_W_TRUNCATE_FILE_TO_ZERO_LENGTH:
                $this->mode = $permissions;

        }

    }