files
Working with file inputs and outputs
BadArchiveError
¶
Bases: OSError
The archive contains a bad file
Source code in packages/common/src/bag3d/common/utils/files.py
13 14 | |
check_export_results(path_quadtree_tsv, export_dir)
¶
Parse the quadtree.tsv written by tyler, check if all formats exists for each
tile, add the tile WKT.
Returns:
| Type | Description |
|---|---|
Iterator[ExportResult]
|
Generator of ExportResult |
Source code in packages/common/src/bag3d/common/utils/files.py
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 | |
export_tile_path(export_dir, tile_id, suffix)
¶
Return the path of a Tyler tile output.
Source code in packages/common/src/bag3d/common/utils/files.py
17 18 19 | |
unzip(file, dest, remove=True)
¶
Uncompress the whole zip archive and optionally delete the zip.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
file
|
Path
|
The Path to the zip. |
required |
dest
|
Path
|
The Path to the destination directory. |
required |
remove
|
bool
|
Whether to remove the zip. |
True
|
Raises:
| Type | Description |
|---|---|
BadArchiveError
|
The archive contains at least one bad file |
Source code in packages/common/src/bag3d/common/utils/files.py
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |