1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
STOWR (Store + Owe) 是一个动态文件压缩和存储工具,使用 Rust 语言开发。
```
src/
├── main.rs # 主程序入口
├── config.rs # 配置管理模块
├── index.rs # 索引管理模块 (JSON/SQLite)
├── storage.rs # 文件存储和压缩模块
└── commands.rs # 命令行处理模块
```
```bash
cargo build
cargo run -- [COMMAND] [OPTIONS...]
cargo build --release
cargo install --path .
```
- -----
STOWR 在使用 `--list` 选项时支持强大的通配符模式:
- ---
```bash
src/*.rs # 存储src目录下所有.rs文件
docs/**/*.md # 递归存储docs目录下所有.md文件
logs/error_?.log # 存储如error_1.log, error_2.log等
backup/**/* # 递归存储backup目录下所有文件
*.txt # 提取所有.txt文件
data/temp_*.json # 提取匹配模式的JSON文件
**/*.pdf # 递归提取所有PDF文件
```
- -
- -------
1. - - -
2. - - -
3. - - -
```bash
stowr help
stowr store document.txt
stowr store --list files_to_store.txt
stowr owe document.txt
stowr list
stowr rename old_name.txt new_name.txt
stowr move file.txt /new/location/
stowr delete file.txt
stowr config --list
stowr config storage.path /custom/path
stowr config index.mode sqlite
```
配置文件位于 `~/.stowr/config.json`,包含以下设置:
```json
{
"storage_path": "/home/user/.stowr/storage",
"index_mode": "Auto"
}
```
- --
项目使用模块化设计:
- ---
项目包含完整的功能测试,验证了所有核心功能:
- ----
压缩率通常在 50-80% 之间,具体取决于文件类型和内容。
- --
- --