public static string GetHash(string sourcePath)
        {
            var data     = MeshTopoShapeInterpreter.FileToData(sourcePath);
            var encoding = Convert.ToBase64String(data);

            return(encoding.GetHashCode().ToString());
        }
Exemplo n.º 2
0
        public static int Compress(string sourcePath, string destinationPath)
        {
            var filedata       = MeshTopoShapeInterpreter.FileToData(sourcePath);
            var compressedData = MeshTopoShapeInterpreter.Pack(filedata);
            var str            = Convert.ToBase64String(compressedData);

            UpdateLogic.MakeSureThatDestinationDirectoriesExist(destinationPath, UpdateLogic.CurrentPath);
            File.WriteAllBytes(destinationPath, compressedData);
            return(str.GetHashCode());
        }
Exemplo n.º 3
0
        private static string GetLengthFromFile(string sourcePath)
        {
            string length;

            try
            {
                length = MeshTopoShapeInterpreter.FileToData(sourcePath).Length.ToString();
            }
            catch
            {
                return("0");
            }
            return(length);
        }
        public static string GetSize(string sourcePath)
        {
            var data = MeshTopoShapeInterpreter.FileToData(sourcePath);

            return(data.Length.ToString());
        }