Пример #1
0
        private void SaveACLs(string filePrefix)
        {
            var acls = _ACLSet.ToJSON();

#if DEBUG
            GZfileIO.WriteStringToGZ($"{filePrefix}Acls.Json", acls);
#endif
            GZfileIO.WriteStringToGZ($"{filePrefix}Acls.Json.gz", acls);
        }
Пример #2
0
        public void Save()
        {
            var machine  = Environment.MachineName;
            var driveID  = _DiskName.Replace(Path.DirectorySeparatorChar.ToString(), "").Replace(":", "");
            var filePath = "DiskInventory";

            if (!Directory.Exists(filePath))
            {
                Directory.CreateDirectory(filePath);
            }
            var filePrefix = $"{filePath}{Path.DirectorySeparatorChar}{machine}_Disk_{driveID}_";
            {
                var acls = _ACLSet.ToJSON();
                GZfileIO.WriteStringToGZ($"{filePrefix}Acls.js", acls);
                GZfileIO.WriteStringToGZ($"{filePrefix}{ACLJsFileName}", acls);
            }
            {
                var dirs = directories.ToJSON();
                GZfileIO.WriteStringToGZ($"{filePrefix}Files.js", dirs);
                GZfileIO.WriteStringToGZ($"{filePrefix}{FileJsFileName}", dirs);
            }
        }