aboutsummaryrefslogtreecommitdiff
path: root/crates/vcs_data/src/data/local/vault_modified.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-01-12 04:28:28 +0800
committer魏曹先生 <1992414357@qq.com>2026-01-12 04:51:34 +0800
commitc5fb22694e95f12c24b8d8af76999be7aea3fcec (patch)
tree399d8a24ce491fb635f3d09f2123290fe784059e /crates/vcs_data/src/data/local/vault_modified.rs
parent444754489aca0454eb54e15a49fb8a6db0b68a07 (diff)
Reorganize crate structure and move documentation files
Diffstat (limited to 'crates/vcs_data/src/data/local/vault_modified.rs')
-rw-r--r--crates/vcs_data/src/data/local/vault_modified.rs30
1 files changed, 0 insertions, 30 deletions
diff --git a/crates/vcs_data/src/data/local/vault_modified.rs b/crates/vcs_data/src/data/local/vault_modified.rs
deleted file mode 100644
index 563d11f..0000000
--- a/crates/vcs_data/src/data/local/vault_modified.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-use crate::{constants::CLIENT_FILE_VAULT_MODIFIED, current::current_local_path};
-
-pub async fn check_vault_modified() -> bool {
- let Some(current_dir) = current_local_path() else {
- return false;
- };
-
- let record_file = current_dir.join(CLIENT_FILE_VAULT_MODIFIED);
- if !record_file.exists() {
- return false;
- }
-
- let Ok(contents) = tokio::fs::read_to_string(&record_file).await else {
- return false;
- };
-
- matches!(contents.trim().to_lowercase().as_str(), "true")
-}
-
-pub async fn sign_vault_modified(modified: bool) {
- let Some(current_dir) = current_local_path() else {
- return;
- };
-
- let record_file = current_dir.join(CLIENT_FILE_VAULT_MODIFIED);
-
- let contents = if modified { "true" } else { "false" };
-
- let _ = tokio::fs::write(&record_file, contents).await;
-}