Module ops

Module ops 

Source
Expand description

High-level filesystem operations (copy, move, delete, chmod, symlinks).

This module provides a builder API for performing filesystem-like operations on repository contents. All modifications are staged and committed atomically.

§Examples

use heroforge_core::Repository;
use heroforge_core::fs::Modify;

let repo = Repository::open_rw("project.forge")?;

// Modify files (copy, move, delete, etc.)
Modify::new(&repo)
    .message("Reorganize project")
    .author("developer")
    .copy_file("README.md", "docs/README.md")
    .move_dir("scripts", "tools")
    .delete_file("old.txt")
    .execute()?;

Structs§

Modify
Builder for filesystem modification operations.
Preview
Preview of staged filesystem operations.

Enums§

Op
A staged filesystem operation.

Functions§

download
Download a file from the repository to the OS filesystem.
download_dir
Download a directory from the repository to the OS filesystem.
download_from_branch
Download a file from a specific branch to the OS filesystem.
download_matching
Download files matching a pattern from the repository to the OS filesystem.
upload
Upload a file from the OS filesystem to the repository.
upload_dir
Upload a directory from the OS filesystem to the repository.