pub struct Workspace(pub PathBuf);
Expand description
Initialize the internal Lorry workspace reponsible for holding mirror and other relavent data. Workspace also contains a few lightweight methods that can return data about an existing mirror.
Directory structure:
git-repository # bare repository that contains mirrored upstream code raw-files # git worktree containing files synchronized via LFS
NOTE: Workspace methods are not asynchronous because these operations are all expected to take place on a single worker thread. Depending on the usage it may be desierable to wrap it in a tokio::Task. Since these are all IO operations and initialization steps blocking should be minimal.
Tuple Fields§
§0: PathBuf
Implementations§
source§impl Workspace
impl Workspace
sourcepub fn new(working_dir: &Path, name: &str) -> Self
pub fn new(working_dir: &Path, name: &str) -> Self
Create a new Workspace based on the workdir and Lorry name
sourcepub fn repository_path(&self) -> PathBuf
pub fn repository_path(&self) -> PathBuf
Return the path to the underlying git repository mirror
sourcepub fn lfs_data_path(&self) -> PathBuf
pub fn lfs_data_path(&self) -> PathBuf
Return the path to the underlying LFS data directory