pub fn from_tree_env(f: &mut impl FuchsiaPaths) -> Result<Self> {
        let fuchsia_build_dir = f.find_fuchsia_build_dir()?;
        println!("[fvdl] Using fuchsia build dir: {:?}", fuchsia_build_dir.display());

        Ok(Self {
            amber_files: {
                let f = fuchsia_build_dir.join("amber-files");
                if f.exists() {
                    Some(f)
                } else {
                    None
                }
            },
            build_args: f.get_image_path(vec!["buildargs"], "gn").ok(),
            fvm: f
                .get_image_path(vec!["storage-full", "storage-sparse", "fvm.fastboot"], "blk")
                .ok(),
            kernel: f.get_image_path(vec!["qemu-kernel"], "kernel")?,
            zbi: f.get_image_path(vec!["zircon-a"], "zbi")?,
        })
    }
/// Initialize fuchsia image and package files for in-tree usage.
///
/// First checks for environment variable FUCHSIA_BUILD_DIR. If not specify looks into
/// <repo_root>/.fx-build-dir. For example ~/fuchsia/.fx-build-dir
Initialize fuchsia image and package files for in-tree usage.
First checks for environment variable FUCHSIA_BUILD_DIR. If not specify looks into
/.fx-build-dir. For example ~/fuchsia/.fx-build-dir
Initialize fuchsia image and package files for in - tree usage . First checks for environment variable FUCHSIA_BUILD_DIR . If not specify looks into / . fx - build - dir . For example ~ / fuchsia / . fx - build - dir
pub fn from_tree_env(f: &mut impl FuchsiaPaths) -> Result<Self> {
        let fuchsia_build_dir = f.find_fuchsia_build_dir()?;
        println!("[fvdl] Using fuchsia build dir: {:?}", fuchsia_build_dir.display());
        Ok(Self {
            amber_files: {
                let f = fuchsia_build_dir.join("amber-files");
                if f.exists() {
                    Some(f)
                } else {
                    None
                }
            },
            build_args: f.get_image_path(vec!["buildargs"], "gn").ok(),
            fvm: f
                .get_image_path(vec!["storage-full", "storage-sparse", "fvm.fastboot"], "blk")
                .ok(),
            kernel: f.get_image_path(vec!["qemu-kernel"], "kernel")?,
            zbi: f.get_image_path(vec!["zircon-a"], "zbi")?,
        })
    }
pub fn from_tree_env ( f : & mut impl FuchsiaPaths ) -> Result < Self > { let fuchsia_build_dir = f . find_fuchsia_build_dir ( ) ? ; println ! ( " " fuchsia_build_dir display ( ) ) ; Ok ( Self { amber_files : { let f = fuchsia_build_dir . join ( " " ) ; if f . exists ( ) { Some ( f ) } else { None } } , build_args : f . get_image_path ( vec ! [ " " ] , " " ) . ok ( ) , fvm : f . get_image_path ( vec ! [ " " " " " " ] , " " ) . ok ( ) , kernel : f . get_image_path ( vec ! [ " " ] , " " ) ? , zbi : f . get_image_path ( vec ! [ " " ] , " " ) ? , } ) }
Initialize fuchsia image and package files for in-tree usage.
Initialize fuchsia image and package files for in - tree usage .
f
&mut impl FuchsiaPaths
f
&mut impl FuchsiaPaths