dazzle-filekit 0.3.4__tar.gz → 0.4.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/PKG-INFO +28 -9
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/README.md +27 -8
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/__init__.py +68 -2
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/links.py +1 -1
- dazzle_filekit-0.4.3/dazzle_filekit/longpath.py +526 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/operations.py +4 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/paths.py +30 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/utils/disk.py +2 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/utils/validation.py +184 -6
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit.egg-info/PKG-INFO +28 -9
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit.egg-info/SOURCES.txt +8 -1
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/pyproject.toml +1 -1
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/setup.py +1 -1
- dazzle_filekit-0.4.3/tests/test_bare_path_guard_and_recovery.py +201 -0
- dazzle_filekit-0.4.3/tests/test_device_paths.py +165 -0
- dazzle_filekit-0.4.3/tests/test_longpath.py +314 -0
- dazzle_filekit-0.4.3/tests/test_longpath_adversarial.py +759 -0
- dazzle_filekit-0.4.3/tests/test_longpath_delta2.py +775 -0
- dazzle_filekit-0.4.3/tests/test_valid_path_separators.py +110 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/LICENSE +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/_fallback.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/content.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/metadata.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/pathenv.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/platform/__init__.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/platform/unix.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/platform/windows.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/utils/__init__.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/utils/compat.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/utils/logger.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit/verification.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit.egg-info/dependency_links.txt +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit.egg-info/requires.txt +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/dazzle_filekit.egg-info/top_level.txt +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/setup.cfg +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_ads_and_junction_v024.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_atomic_stream_writer.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_atomic_write_retry.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_auto_naming.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_compat.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_content_and_process.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_disk.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_fallback.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_import_stability.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_junction_detection_improvements.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_link_fidelity_v034.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_link_primitives.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_metadata_v024_roundtrip.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_native_hash_backend.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_operations_primitives_v024.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_pathenv.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_pathenv_edgecases.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_paths_platform_simulation.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_paths_v024_enrichments.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_phase_b_absorb_and_v9.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_phase_c_renames.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_phase_d_typeddicts.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_resolver_ops.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_smoke.py +0 -0
- {dazzle_filekit-0.3.4 → dazzle_filekit-0.4.3}/tests/test_symlink_timestamps_v031.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dazzle-filekit
|
|
3
|
-
Version: 0.3
|
|
3
|
+
Version: 0.4.3
|
|
4
4
|
Summary: Cross-platform file operations toolkit with path handling, verification, and metadata preservation
|
|
5
5
|
Author: Dustin
|
|
6
6
|
Author-email: Dustin Darcy <6962246+djdarcy@users.noreply.github.com>
|
|
@@ -42,9 +42,10 @@ Dynamic: requires-python
|
|
|
42
42
|
|
|
43
43
|
# dazzle-filekit
|
|
44
44
|
|
|
45
|
-
[](https://github.com/DazzleLib/dazzle-filekit/releases)
|
|
46
45
|
[](https://pypi.org/project/dazzle-filekit/)
|
|
47
|
-
[](https://github.com/DazzleLib/dazzle-filekit/releases)
|
|
47
|
+
[](https://pypistats.org/packages/dazzle-filekit)
|
|
48
|
+
[](https://dazzle-filekit.readthedocs.io/)
|
|
48
49
|
[](https://www.python.org/downloads/)
|
|
49
50
|
[](https://opensource.org/licenses/MIT)
|
|
50
51
|
[](https://github.com/DazzleLib/dazzle-filekit/discussions)
|
|
@@ -68,6 +69,7 @@ A Python toolkit for reliable file operations across Windows, Linux, and macOS.
|
|
|
68
69
|
- **Platform Support** - Windows, Linux, and macOS with platform-specific optimizations
|
|
69
70
|
- **UNC Path Detection** - Native `is_unc_path` / `classify_fs_object` helpers; built on [UNCtools](https://github.com/DazzleLib/UNCtools) (a hard dependency as of 0.3.0) for UNC ↔ drive-letter translation and the optional path-variant resolver edge (see [docs/unctools-integration.md](docs/unctools-integration.md))
|
|
70
71
|
- **Link Primitives** - `analyze_link` / `create_junction` / `create_hardlink` / `read_link_target` (intrinsic link analysis; junctions via PowerShell, no `cmd`)
|
|
72
|
+
- **Long-Path Shims** - `shim_path` makes a file over Windows' 260-character `MAX_PATH` openable by *any* application, by siting a junction at a short root and handing back a shorter name for the same bytes. `\\?\` only lifts the limit at the API layer; it does not help an app that copies the path into a fixed 260-byte buffer (observed in two PDF readers), and nothing outside such an app can fix its buffer. A no-op on Linux/macOS, where `PATH_MAX` is 4096/1024
|
|
71
73
|
|
|
72
74
|
## Why dazzle-filekit?
|
|
73
75
|
|
|
@@ -139,8 +141,11 @@ from dazzle_filekit import normalize_cross_platform_path, find_files, is_unc_pat
|
|
|
139
141
|
path = normalize_cross_platform_path("/some/path/../file.txt")
|
|
140
142
|
print(path) # PosixPath('/some/file.txt') or WindowsPath('C:/some/file.txt')
|
|
141
143
|
|
|
142
|
-
# Find files with patterns
|
|
143
|
-
|
|
144
|
+
# Find files with patterns. NOTE: search_paths is a LIST of directories.
|
|
145
|
+
# Passing a bare string iterates it character by character -- and since
|
|
146
|
+
# Path("/") is the drive root and recursive=True is the default, that would
|
|
147
|
+
# attempt to walk the entire filesystem.
|
|
148
|
+
files = find_files(["/directory"], patterns=["*.py", "*.txt"]) # -> list[Path]
|
|
144
149
|
|
|
145
150
|
# Check UNC paths
|
|
146
151
|
if is_unc_path(r"\\server\share"):
|
|
@@ -195,13 +200,22 @@ has_space, message = ensure_disk_space(
|
|
|
195
200
|
```python
|
|
196
201
|
from dazzle_filekit import calculate_file_hash, verify_file_hash
|
|
197
202
|
|
|
198
|
-
# Calculate
|
|
199
|
-
|
|
203
|
+
# Calculate hashes. Note the plural: `algorithms` takes a LIST and the result
|
|
204
|
+
# is a DICT keyed by algorithm name (defaults to ["SHA256"]).
|
|
205
|
+
hashes = calculate_file_hash("file.txt") # {'SHA256': '2cf24dba...'}
|
|
206
|
+
hashes = calculate_file_hash("file.txt", algorithms=["md5", "sha256"])
|
|
200
207
|
|
|
201
|
-
# Verify
|
|
202
|
-
|
|
208
|
+
# Verify against a dict in that same shape. Returns (overall_ok, per_algorithm).
|
|
209
|
+
expected = {"sha256": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"}
|
|
210
|
+
is_valid, detail = verify_file_hash("file.txt", expected)
|
|
203
211
|
```
|
|
204
212
|
|
|
213
|
+
> `calculate_file_hash_native(path, algorithm="sha256")` hashes via a
|
|
214
|
+
> platform-native binary instead — faster on large files, but **singular**
|
|
215
|
+
> `algorithm`, returns a plain string, and returns `None` when no tool is
|
|
216
|
+
> available. The caller does the fallback:
|
|
217
|
+
> `native(p) or calculate_file_hash(p)["SHA256"]`.
|
|
218
|
+
|
|
205
219
|
### Atomic Writes (v0.2.4)
|
|
206
220
|
|
|
207
221
|
```python
|
|
@@ -270,6 +284,7 @@ For the full function-by-function reference, see
|
|
|
270
284
|
| **Verification** | `calculate_file_hash`, `verify_file_hash`, `verify_files_with_manifest`, `compare_directories` |
|
|
271
285
|
| **UNC detection** | `is_unc_path`, `classify_fs_object` (UNCtools is the hard-dep L0 layer for translation + the resolver edge -- see [docs/unctools-integration.md](docs/unctools-integration.md)) |
|
|
272
286
|
| **Link primitives** | `analyze_link`, `detect_link_type`, `read_link_target`, `create_junction`, `create_hardlink` |
|
|
287
|
+
| **Long paths** | `dazzle_filekit.longpath` -- `shim_path` (one-call), `needs_shim`, `plan_shim`, `resolve_shim_root`, `budget_for`, `create_shim`, `remove_shim`, `reap_shims` |
|
|
273
288
|
|
|
274
289
|
## Platform Support
|
|
275
290
|
|
|
@@ -327,6 +342,10 @@ flake8 dazzle_filekit tests
|
|
|
327
342
|
|
|
328
343
|
## Documentation
|
|
329
344
|
|
|
345
|
+
**📖 [dazzle-filekit.readthedocs.io](https://dazzle-filekit.readthedocs.io/)** -- the rendered site: searchable, cross-linked, with `[source]` links from every symbol to its implementation, plus a [recipes](https://dazzle-filekit.readthedocs.io/en/latest/recipes.html) page of task-shaped examples and a [generated API](https://dazzle-filekit.readthedocs.io/en/latest/autoapi.html) built from the docstrings.
|
|
346
|
+
|
|
347
|
+
The same pages read fine on GitHub if you would rather stay here:
|
|
348
|
+
|
|
330
349
|
- **[docs/api-reference.md](docs/api-reference.md)** -- full function-by-function reference
|
|
331
350
|
- **[docs/api-stability.md](docs/api-stability.md)** -- locked public API surface and known external callers. Changes to symbols listed here require a migration plan.
|
|
332
351
|
- **[docs/platform-support.md](docs/platform-support.md)** -- platform matrix, test counts, and platform-specific feature breakdown
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# dazzle-filekit
|
|
2
2
|
|
|
3
|
-
[](https://github.com/DazzleLib/dazzle-filekit/releases)
|
|
4
3
|
[](https://pypi.org/project/dazzle-filekit/)
|
|
5
|
-
[](https://github.com/DazzleLib/dazzle-filekit/releases)
|
|
5
|
+
[](https://pypistats.org/packages/dazzle-filekit)
|
|
6
|
+
[](https://dazzle-filekit.readthedocs.io/)
|
|
6
7
|
[](https://www.python.org/downloads/)
|
|
7
8
|
[](https://opensource.org/licenses/MIT)
|
|
8
9
|
[](https://github.com/DazzleLib/dazzle-filekit/discussions)
|
|
@@ -26,6 +27,7 @@ A Python toolkit for reliable file operations across Windows, Linux, and macOS.
|
|
|
26
27
|
- **Platform Support** - Windows, Linux, and macOS with platform-specific optimizations
|
|
27
28
|
- **UNC Path Detection** - Native `is_unc_path` / `classify_fs_object` helpers; built on [UNCtools](https://github.com/DazzleLib/UNCtools) (a hard dependency as of 0.3.0) for UNC ↔ drive-letter translation and the optional path-variant resolver edge (see [docs/unctools-integration.md](docs/unctools-integration.md))
|
|
28
29
|
- **Link Primitives** - `analyze_link` / `create_junction` / `create_hardlink` / `read_link_target` (intrinsic link analysis; junctions via PowerShell, no `cmd`)
|
|
30
|
+
- **Long-Path Shims** - `shim_path` makes a file over Windows' 260-character `MAX_PATH` openable by *any* application, by siting a junction at a short root and handing back a shorter name for the same bytes. `\\?\` only lifts the limit at the API layer; it does not help an app that copies the path into a fixed 260-byte buffer (observed in two PDF readers), and nothing outside such an app can fix its buffer. A no-op on Linux/macOS, where `PATH_MAX` is 4096/1024
|
|
29
31
|
|
|
30
32
|
## Why dazzle-filekit?
|
|
31
33
|
|
|
@@ -97,8 +99,11 @@ from dazzle_filekit import normalize_cross_platform_path, find_files, is_unc_pat
|
|
|
97
99
|
path = normalize_cross_platform_path("/some/path/../file.txt")
|
|
98
100
|
print(path) # PosixPath('/some/file.txt') or WindowsPath('C:/some/file.txt')
|
|
99
101
|
|
|
100
|
-
# Find files with patterns
|
|
101
|
-
|
|
102
|
+
# Find files with patterns. NOTE: search_paths is a LIST of directories.
|
|
103
|
+
# Passing a bare string iterates it character by character -- and since
|
|
104
|
+
# Path("/") is the drive root and recursive=True is the default, that would
|
|
105
|
+
# attempt to walk the entire filesystem.
|
|
106
|
+
files = find_files(["/directory"], patterns=["*.py", "*.txt"]) # -> list[Path]
|
|
102
107
|
|
|
103
108
|
# Check UNC paths
|
|
104
109
|
if is_unc_path(r"\\server\share"):
|
|
@@ -153,13 +158,22 @@ has_space, message = ensure_disk_space(
|
|
|
153
158
|
```python
|
|
154
159
|
from dazzle_filekit import calculate_file_hash, verify_file_hash
|
|
155
160
|
|
|
156
|
-
# Calculate
|
|
157
|
-
|
|
161
|
+
# Calculate hashes. Note the plural: `algorithms` takes a LIST and the result
|
|
162
|
+
# is a DICT keyed by algorithm name (defaults to ["SHA256"]).
|
|
163
|
+
hashes = calculate_file_hash("file.txt") # {'SHA256': '2cf24dba...'}
|
|
164
|
+
hashes = calculate_file_hash("file.txt", algorithms=["md5", "sha256"])
|
|
158
165
|
|
|
159
|
-
# Verify
|
|
160
|
-
|
|
166
|
+
# Verify against a dict in that same shape. Returns (overall_ok, per_algorithm).
|
|
167
|
+
expected = {"sha256": "2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824"}
|
|
168
|
+
is_valid, detail = verify_file_hash("file.txt", expected)
|
|
161
169
|
```
|
|
162
170
|
|
|
171
|
+
> `calculate_file_hash_native(path, algorithm="sha256")` hashes via a
|
|
172
|
+
> platform-native binary instead — faster on large files, but **singular**
|
|
173
|
+
> `algorithm`, returns a plain string, and returns `None` when no tool is
|
|
174
|
+
> available. The caller does the fallback:
|
|
175
|
+
> `native(p) or calculate_file_hash(p)["SHA256"]`.
|
|
176
|
+
|
|
163
177
|
### Atomic Writes (v0.2.4)
|
|
164
178
|
|
|
165
179
|
```python
|
|
@@ -228,6 +242,7 @@ For the full function-by-function reference, see
|
|
|
228
242
|
| **Verification** | `calculate_file_hash`, `verify_file_hash`, `verify_files_with_manifest`, `compare_directories` |
|
|
229
243
|
| **UNC detection** | `is_unc_path`, `classify_fs_object` (UNCtools is the hard-dep L0 layer for translation + the resolver edge -- see [docs/unctools-integration.md](docs/unctools-integration.md)) |
|
|
230
244
|
| **Link primitives** | `analyze_link`, `detect_link_type`, `read_link_target`, `create_junction`, `create_hardlink` |
|
|
245
|
+
| **Long paths** | `dazzle_filekit.longpath` -- `shim_path` (one-call), `needs_shim`, `plan_shim`, `resolve_shim_root`, `budget_for`, `create_shim`, `remove_shim`, `reap_shims` |
|
|
231
246
|
|
|
232
247
|
## Platform Support
|
|
233
248
|
|
|
@@ -285,6 +300,10 @@ flake8 dazzle_filekit tests
|
|
|
285
300
|
|
|
286
301
|
## Documentation
|
|
287
302
|
|
|
303
|
+
**📖 [dazzle-filekit.readthedocs.io](https://dazzle-filekit.readthedocs.io/)** -- the rendered site: searchable, cross-linked, with `[source]` links from every symbol to its implementation, plus a [recipes](https://dazzle-filekit.readthedocs.io/en/latest/recipes.html) page of task-shaped examples and a [generated API](https://dazzle-filekit.readthedocs.io/en/latest/autoapi.html) built from the docstrings.
|
|
304
|
+
|
|
305
|
+
The same pages read fine on GitHub if you would rather stay here:
|
|
306
|
+
|
|
288
307
|
- **[docs/api-reference.md](docs/api-reference.md)** -- full function-by-function reference
|
|
289
308
|
- **[docs/api-stability.md](docs/api-stability.md)** -- locked public API surface and known external callers. Changes to symbols listed here require a migration plan.
|
|
290
309
|
- **[docs/platform-support.md](docs/platform-support.md)** -- platform matrix, test counts, and platform-specific feature breakdown
|
|
@@ -138,7 +138,45 @@ from .pathenv import (
|
|
|
138
138
|
append_path_value,
|
|
139
139
|
)
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
# v0.4.2 device/sink predicate -- "is this string a PLACE?", as distinct from
|
|
142
|
+
# is_valid_path's "is this string LEGAL?". /dev/null is legal but is not a
|
|
143
|
+
# location, so any consumer harvesting paths out of shell commands, configs,
|
|
144
|
+
# or logs needs the former. (Driven by Claude-Session-Backup #56, where
|
|
145
|
+
# `2>/dev/null` was being indexed as a session's top working directory.)
|
|
146
|
+
from .utils.validation import ( # noqa: F401
|
|
147
|
+
POSIX_DEVICE_PATHS,
|
|
148
|
+
SILENT_ESCAPE_ORIGINS,
|
|
149
|
+
WINDOWS_INVALID_NAMES,
|
|
150
|
+
ensure_path_collection,
|
|
151
|
+
has_unescaped_backslash_damage,
|
|
152
|
+
is_device_path,
|
|
153
|
+
recover_unescaped_path,
|
|
154
|
+
suggest_reescaped_path,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
# v0.4.0 long-path shims -- the remedy for the condition
|
|
158
|
+
# utils.validation.is_valid_path already detects (paths over MAX_PATH without a
|
|
159
|
+
# \\?\ prefix). Windows-only in effect; a no-op elsewhere.
|
|
160
|
+
from . import longpath # noqa: F401
|
|
161
|
+
from .longpath import (
|
|
162
|
+
MAX_PATH,
|
|
163
|
+
USABLE_PATH,
|
|
164
|
+
DEFAULT_THRESHOLD,
|
|
165
|
+
NAME_MAX,
|
|
166
|
+
SHIM_DIR_NAME,
|
|
167
|
+
ShimPlan,
|
|
168
|
+
needs_shim,
|
|
169
|
+
candidate_roots,
|
|
170
|
+
resolve_shim_root,
|
|
171
|
+
budget_for,
|
|
172
|
+
plan_shim,
|
|
173
|
+
create_shim,
|
|
174
|
+
remove_shim,
|
|
175
|
+
reap_shims,
|
|
176
|
+
shim_path,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
__version__ = '0.4.3'
|
|
142
180
|
|
|
143
181
|
def configure_logging(level=logging.INFO, log_file=None):
|
|
144
182
|
"""
|
|
@@ -290,6 +328,17 @@ __all__ = [
|
|
|
290
328
|
'path_value_contains',
|
|
291
329
|
'append_path_value',
|
|
292
330
|
|
|
331
|
+
# Device / sink predicate (v0.4.2) -- "is this a PLACE?", distinct from
|
|
332
|
+
# is_valid_path's "is this LEGAL?"
|
|
333
|
+
'is_device_path',
|
|
334
|
+
'ensure_path_collection',
|
|
335
|
+
'has_unescaped_backslash_damage',
|
|
336
|
+
'recover_unescaped_path',
|
|
337
|
+
'suggest_reescaped_path',
|
|
338
|
+
'SILENT_ESCAPE_ORIGINS',
|
|
339
|
+
'POSIX_DEVICE_PATHS',
|
|
340
|
+
'WINDOWS_INVALID_NAMES',
|
|
341
|
+
|
|
293
342
|
# Verification functions
|
|
294
343
|
'calculate_file_hash',
|
|
295
344
|
'detect_native_hash_tool',
|
|
@@ -300,5 +349,22 @@ __all__ = [
|
|
|
300
349
|
'save_hashes_to_file',
|
|
301
350
|
'load_hashes_from_file',
|
|
302
351
|
'compare_directories',
|
|
303
|
-
'verify_copied_files'
|
|
352
|
+
'verify_copied_files',
|
|
353
|
+
|
|
354
|
+
# long-path shims (v0.4.0)
|
|
355
|
+
'MAX_PATH',
|
|
356
|
+
'USABLE_PATH',
|
|
357
|
+
'DEFAULT_THRESHOLD',
|
|
358
|
+
'NAME_MAX',
|
|
359
|
+
'SHIM_DIR_NAME',
|
|
360
|
+
'ShimPlan',
|
|
361
|
+
'needs_shim',
|
|
362
|
+
'candidate_roots',
|
|
363
|
+
'resolve_shim_root',
|
|
364
|
+
'budget_for',
|
|
365
|
+
'plan_shim',
|
|
366
|
+
'create_shim',
|
|
367
|
+
'remove_shim',
|
|
368
|
+
'reap_shims',
|
|
369
|
+
'shim_path',
|
|
304
370
|
]
|
|
@@ -51,7 +51,7 @@ LINK_HARDLINK = "hardlink"
|
|
|
51
51
|
class LinkInfo:
|
|
52
52
|
"""Intrinsic facts about a single link (no destination relationship).
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
Attributes:
|
|
55
55
|
link_path: the link itself.
|
|
56
56
|
kind: ``'symlink'`` | ``'junction'`` | ``'hardlink'`` | ``None`` (not a link).
|
|
57
57
|
raw_target: target as stored in the link (readlink result for symlinks,
|