ruwebframe 0.1.0

A brief description of your crate.
Documentation
use crate::rubase::ruentity;
use crate::rubase::rutils::fileutils;
use crate::rudi::didto;
use crate::rudi::difactroy::ruast;
use serde::{Deserialize, Serialize};
use std::io;

#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct DiFactroy {
    pub notShowExist: bool,
}

impl ruentity::BaseEntitySingle for DiFactroy {}

impl DiFactroy {
    pub fn new() -> DiFactroy {
        DiFactroy {
            notShowExist: true,
        }
    }

    pub fn FindBasePkg() -> String {
        return String::new();
    }

    pub fn FindFileStruct(filePath: String) -> didto::didto::StructInfo {
        let ret = fileutils::read_file(filePath.as_str());

        let ifSingle = false;
        for line in ret.unwrap().as_str().split("\n") {}
        didto::didto::StructInfo::default("".into(), "".into(), filePath, true)
    }

    // 创建文件_init.rs
    pub fn CreateInit() -> String {
        //if
        return String::new();
    }
    pub fn CreateInitForce() -> String {
        return String::new();
    }

    pub fn list_all_files(dir: &str) -> Vec<String> {
        fileutils::list_all_files_rs(dir)
    }
    pub fn read_file(file_name: &str) -> Result<String, io::Error> {
        fileutils::read_file(file_name)
    }
    pub fn parse_all_files(&self, dir: &str) -> Vec<didto::StructInfo> {
        let ua = ruast::RuAst::new();
        let mut results = Vec::<didto::StructInfo>::new();
        for f in fileutils::list_all_files_rs(dir) {
            let content = fileutils::read_file(f.as_str()).unwrap();
            let v = ua.find_entity_all(f.as_str(), content.as_str());
            results.extend(v);
        }
        results
    }
}