|
Blender V5.3
|
#include <asset_indexer_remote_file_status.hh>
Public Member Functions | |
| FileStatusChecker (StringRefNull library_root_path) | |
| ~FileStatusChecker ()=default | |
| asset_system::RemoteAssetFileStatus | remote_file_status (RemoteListingFileEntry &file_to_check) |
Check files on disk against their expected hash / size in bytes.
Instances of this class manage their own Disk File Hash Service for efficiently computing file hashes.
Definition at line 32 of file asset_indexer_remote_file_status.hh.
|
explicit |
Definition at line 35 of file asset_indexer_remote_file_status.cc.
References BLI_path_join, blender::StringRefNull::c_str(), blender::asset_system::disk_file_hash_service_get(), blender::ed::asset::index::hash_service_filename_prefix, and PATH_MAX.
|
default |
References remote_file_status().
| RemoteAssetFileStatus blender::ed::asset::index::FileStatusChecker::remote_file_status | ( | RemoteListingFileEntry & | file_to_check | ) |
Determine the status of the file on disk.
Once a file has been checked, its RemoteListingFileEntry is updated to reflect its status. Subsequent checks just return that status, so this is efficient to call for each asset that uses the file.
Definition at line 44 of file asset_indexer_remote_file_status.cc.
References blender::BLI_exists(), BLI_path_join, blender::BLI_str_tolower_ascii(), blender::StringRefNull::c_str(), CLOG_WARN, blender::ed::asset::index::RemoteListingFileEntry::download_url, blender::ed::asset::index::RemoteListingFileEntry::file_status, blender::blender::StringRefBase::find_first_of(), blender::asset_system::URLWithHash::hash, blender::ed::asset::index::RemoteListingFileEntry::local_path, LOG, blender::asset_system::MATCH, blender::asset_system::NO_MATCH, blender::blender::StringRefBase::not_found, blender::asset_system::NOT_ON_DISK, PATH_MAX, blender::ed::asset::index::RemoteListingFileEntry::size_in_bytes, and blender::blender::StringRefBase::substr().
Referenced by blender::ed::asset::index::listing_entries_from_root(), and ~FileStatusChecker().