Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions docs/lfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ Functions for interacting with the local file system (LFS).
- [`chkdir`](#chkdirpath-make_if_not_presentfalse) - Check/create directory
- [`mkdir`](#mkdirpath) - Create directory tree
- [`get_app_location`](#get_app_location) - Get app directory

- [`zip_file`]()
- [`zip_file`](#zip_filefile_to_zip-zip_filename-overwritefalse-recursefalse) - Compress one or more files into a single ZIP archive

**PyInstaller:**
- [`resource_path`](#resource_pathrelative_path) - Get resource path
Expand All @@ -31,18 +30,6 @@ Functions for interacting with the local file system (LFS).

## File Operations

### `zip_file(file_to_zip, zip_filename, overwrite=False, recurse=False)`

Compresses one or more files into a single ZIP file.

**Parameters:**
- `file_to_zip` (str): Filename/pattern to compress, including path
- `zip_filename` (str): ZIP filename to create, including path
- `overwrite` (bool): Overwrite existing ZIP file
- `recurse` (bool): Recurse child directories. Ignored if `files_to_zip` is an individual file.

**Returns:** `bool` - `True` if the zip file was successfully created.

### `chkfile(path)`

Check if a file exists.
Expand Down Expand Up @@ -155,6 +142,21 @@ Get the application's directory. Works for both Python scripts and PyInstaller e

**Returns:** `str` - Absolute path to application directory

---

### `zip_file(file_to_zip, zip_filename, overwrite=False, recurse=False)`

Compresses one or more files into a single ZIP archive.

**Parameters:**
- `file_to_zip` (str): Filename/pattern to compress, including path
- `zip_filename` (str): ZIP filename to create, including path
- `overwrite` (bool): Overwrite existing ZIP file
- `recurse` (bool): Recurse child directories. Ignored if `files_to_zip` is an individual file.

**Returns:** `bool` - `True` if the zip file was successfully created.


## PyInstaller Support

### `resource_path(relative_path)`
Expand Down