add link_mod_file to linker
This commit is contained in:
@@ -4,7 +4,7 @@ use std::{
|
|||||||
path::{Path, PathBuf},
|
path::{Path, PathBuf},
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::fomod::FileTypeEnum;
|
use crate::{Mod, ModFile, fomod::FileTypeEnum};
|
||||||
|
|
||||||
pub struct Linker {
|
pub struct Linker {
|
||||||
target: PathBuf,
|
target: PathBuf,
|
||||||
@@ -49,6 +49,12 @@ impl Linker {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn link_mod_file(&self, file: &ModFile, from_mod: &Mod) -> Result<(), LinkerError> {
|
||||||
|
let src = from_mod.source.join(&file.source);
|
||||||
|
|
||||||
|
self.link_file(&src, &file.dest)
|
||||||
|
}
|
||||||
|
|
||||||
pub fn link_plugin_files(
|
pub fn link_plugin_files(
|
||||||
&self,
|
&self,
|
||||||
entries: &[FileTypeEnum],
|
entries: &[FileTypeEnum],
|
||||||
|
|||||||
Reference in New Issue
Block a user