original_string: public function is_file_readable_locally_by_hash($contenthash, $fetchifnotfound = false) {
          if ($contenthash === file_storage::hash_from_string('')) {
              // Files with empty size are either directories or empty.
              // We handle these virtually.
              return true;
          }
  
          // This is called by file_storage::content_exists(), and in turn by the repository system.
          $path = $this->get_local_path_from_hash($contenthash, $fetchifnotfound);
  
          // Note - it is not possible to perform a content recovery safely from a hash alone.
          return is_readable($path);
      }
code: public function is_file_readable_locally_by_hash($contenthash, $fetchifnotfound = false) {
          if ($contenthash === file_storage::hash_from_string('')) {
              // Files with empty size are either directories or empty.
              // We handle these virtually.
              return true;
          }
  
          // This is called by file_storage::content_exists(), and in turn by the repository system.
          $path = $this->get_local_path_from_hash($contenthash, $fetchifnotfound);
  
          // Note - it is not possible to perform a content recovery safely from a hash alone.
          return is_readable($path);
      }
code_tokens: public function is_file_readable_locally_by_hash ( $ contenthash , $ fetchifnotfound = false ) { if ( $ contenthash === file_storage :: hash_from_string ( '' ) ) { // Files with empty size are either directories or empty. // We handle these virtually. return true ; } // This is called by file_storage::content_exists(), and in turn by the repository system. $ path = $ this -> get_local_path_from_hash ( $ contenthash , $ fetchifnotfound ) ; // Note - it is not possible to perform a content recovery safely from a hash alone. return is_readable ( $ path ) ; }
docstring: Determine whether the file is present on the file system somewhere given
  the contenthash.
  
  @param string $contenthash The contenthash of the file to check.
  @param bool $fetchifnotfound Whether to attempt to fetch from the remote path if not found.
  @return bool
docstring_tokens: Determine whether the file is present on the file system somewhere given the contenthash .