|
| ON_FileReference ()=default |
|
| ON_FileReference (const ON_FileReference &)=default |
|
| ON_FileReference (const wchar_t *full_path, const wchar_t *relative_path, ON_ContentHash content_hash, ON_FileReference::Status full_path_status) |
|
| ~ON_FileReference ()=default |
|
void | ClearContentHash () |
|
void | ClearFullPath () |
|
void | ClearRelativePath () |
|
const ON_ContentHash & | ContentHash () const |
|
void | Dump (class ON_TextLog &text_log) const |
|
ON_UUID | EmbeddedFileId () const |
|
ON_FileReference::FindFilePreference | FindFile (const wchar_t *base_path, bool bBasePathIncludesFileName, ON_FileReference::FindFilePreference first_choice, ON_FileReference::FindFilePreference second_choice, ON_FileReference::FindFilePreference third_choice, ON_FileReference::FindFilePreference forth_choice, ON_FileReference::FindFilePreference fifth_choice, ON_wString &found_file_full_path) const |
| Uses the full path, relative path and parameter information to find a full path to a file that exists. More...
|
|
ON_FileReference::FindFilePreference | FindFile (const wchar_t *base_path, bool bBasePathIncludesFileName, ON_wString &found_file_full_path) const |
| Uses the full path, relative path and parameter information to find a full path to a file that exists. More...
|
|
ON_FileReference::FindFilePreference | FindFileAndUpdateReference (const wchar_t *base_path, bool bBasePathIncludesFileName, ON_FileReference::FindFilePreference first_choice, ON_FileReference::FindFilePreference second_choice, ON_FileReference::FindFilePreference third_choice, ON_FileReference::FindFilePreference forth_choice, ON_FileReference::FindFilePreference fifth_choice, bool bUpdateContentHash, ON_wString &found_file_full_path) |
| The search for the file is identical to the one performed by find file. If a file is found, the full path setting in this reference is updated. More...
|
|
ON_FileReference::FindFilePreference | FindFileAndUpdateReference (const wchar_t *base_path, bool bBasePathIncludesFileName, bool bUpdateContentHash, ON_wString &found_file_full_path) |
| The search for the file is identical to the one performed by find file. If a file is found, the full path setting in this reference is updated. More...
|
|
ON_FileReference::FindFilePreference | FindFileAndUpdateReference (const wchar_t *base_path, bool bBasePathIncludesFileName, bool bUpdateContentHash) |
|
const ON_wString & | FullPath () const |
|
const wchar_t * | FullPathAsPointer () const |
|
const ON_SHA1_Hash & | FullPathHash () const |
|
ON_FileReference::Status | FullPathStatus () const |
|
bool | IsNotSet () const |
|
bool | IsSet () const |
|
ON_FileReference & | operator= (const ON_FileReference &)=default |
|
bool | Read (ON_BinaryArchive &archive) |
|
const ON_ContentHash & | RecentContentHash (ON__UINT64 recent_time) const |
|
const ON_wString & | RelativePath () const |
|
const wchar_t * | RelativePathAsPointer () const |
|
void | SetContentHash (ON_ContentHash content_hash) |
|
void | SetEmbeddedFileId (ON_UUID embedded_file_id) |
|
void | SetFullPath (const wchar_t *full_path, bool bSetContentHash) |
|
void | SetFullPath (const char *full_path, bool bSetContentHash) |
|
void | SetFullPathStatus (ON_FileReference::Status full_path_status) |
|
void | SetRelativePath (const wchar_t *relative_path) |
|
void | SetRelativePath (const char *relative_path) |
|
void | SetRelativePathFromBasePath (const wchar_t *base_path, bool bBasePathContainsFileName) |
|
void | SetRelativePathFromBasePath (const char *base_path, bool bBasePathContainsFileName) |
|
unsigned int | SizeOf () const |
|
bool | UpdateContentHash () |
|
bool | Write (bool bUseArchiveDirectoryAsBasePath, ON_BinaryArchive &archive) const |
|
bool | Write (const wchar_t *base_path, bool bBasePathIncludesFileName, ON_BinaryArchive &archive) const |
|
Uses the full path, relative path and parameter information to find a full path to a file that exists.
- Parameters
-
base_path | [in] If base_path and RelativePath() are not empty, then path base_path+RelativePath(). If base_path is not empty, then base_path + filename is considered. |
bBasePathIncludesFileName | [in] True if base_path contains a file name that must be removed to get a directory path. |
first_choice | [in] When multiple files are found in different locations, the first_choice, second_choice, third_choice, forth_choice, and fifth_choice parameters are used to select which file is returned. |
second_choice | [in] When multiple files are found in different locations, the first_choice, second_choice, third_choice, forth_choice, and fifth_choice parameters are used to select which file is returned. |
third_choice | [in] When multiple files are found in different locations, the first_choice, second_choice, third_choice, forth_choice, and fifth_choice parameters are used to select which file is returned. |
forth_choice | [in] When multiple files are found in different locations, the first_choice, second_choice, third_choice, forth_choice, and fifth_choice parameters are used to select which file is returned. |
fifth_choice | [in] When multiple files are found in different locations, the first_choice, second_choice, third_choice, forth_choice, and fifth_choice parameters are used to select which file is returned. |
full_path | [out] A full path to a file that exists. If FullPath() and base_path+RelativePath() resolve to different files, the content hash information is used to select the file. |
- Returns
- If the file is found, then the returned ON_FileReference::FindFilePreference enum value indicates why it was selected. If the file is not found, then ON_FileReference::FindFilePreference::None is returned and full_path is empty.
The locations FullPath(), base_path+RelativePath(), and base_path+FileName() are tested. If multiple files are found, first_choice, second_choice, third_choice, forth_choice, and fifth_choice are used to select which file is returned.
Uses the full path, relative path and parameter information to find a full path to a file that exists.
- Parameters
-
base_path | [in] If base_path and RelativePath() are not empty, then path base_path+RelativePath(). If base_path is not empty, then base_path + filename is considered. |
bBasePathIncludesFileName | [in] True if base_path contains a file name that must be removed to get a directory path. |
- Returns
- If the file is found, then the returned ON_FileReference::FindFilePreference enum value indicates why it was selected. If the file is not found, then ON_FileReference::FindFilePreference::None is returned and full_path is empty.
The locations FullPath(), base_path+RelativePath(), and base_path+FileName() are tested. If multiple files are found, the returned file is selected in the order relative path, full path, content match, base path and most recently modified. If you prefer a different order, use the version of ON_FileReference::FindFile with 5 ON_FileReference::FindFilePreference parameters.