Ejemplo n.º 1
0
        public static int GetVersion(FlowPackage pkg)
        {
            string versionFilePath = Path.Combine(GetPkgFolder(pkg), "ver.ini");

            if (!File.Exists(versionFilePath))
            {
                return(0);
            }
            return(IOUtils.ReadLines(versionFilePath)[0].Split('#')[0].GetInt());
        }
Ejemplo n.º 2
0
        public static bool IsInstalled(FlowPackage pkg)
        {
            string path = GetPkgFolder(pkg);

            return(Directory.Exists(path) && IOUtils.GetAmountOfFiles(path, true) > 0);
        }
Ejemplo n.º 3
0
 public static bool IsUpToDate(FlowPackage pkg, int minVersion)
 {
     return(GetVersion(pkg) >= minVersion);
 }
Ejemplo n.º 4
0
 public static string GetPkgFolder(FlowPackage pkg)
 {
     return(Path.Combine(Paths.GetPkgPath(), Path.GetFileNameWithoutExtension(pkg.fileName)));
 }