public function is_file_readable_remotely_by_hash($contenthash) {
        if ($contenthash === file_storage::hash_from_string('')) {
            // Files with empty size are either directories or empty.
            // We handle these virtually.
            return true;
        }

        $path = $this->get_remote_path_from_hash($contenthash, false);

        // Note - it is not possible to perform a content recovery safely from a hash alone.
        return is_readable($path);
    }
public function is_file_readable_remotely_by_hash($contenthash) {
        if ($contenthash === file_storage::hash_from_string('')) {
            // Files with empty size are either directories or empty.
            // We handle these virtually.
            return true;
        }

        $path = $this->get_remote_path_from_hash($contenthash, false);

        // Note - it is not possible to perform a content recovery safely from a hash alone.
        return is_readable($path);
    }
public function is_file_readable_remotely_by_hash ( $ contenthash ) { if ( $ contenthash === file_storage :: hash_from_string ( '' ) ) { // Files with empty size are either directories or empty. // We handle these virtually. return true ; } $ path = $ this -> get_remote_path_from_hash ( $ contenthash , false ) ; // Note - it is not possible to perform a content recovery safely from a hash alone. return is_readable ( $ path ) ; }
Determine whether the file is present locally on the file system somewhere given
the contenthash.

@param string $contenthash The contenthash of the file to check.
@return bool
Determine whether the file is present locally on the file system somewhere given the contenthash .