AcTools.AcdFile.Acd.FromDirectory C# (CSharp) Method

FromDirectory() public static method

public static FromDirectory ( string dir ) : Acd
dir string
return Acd
        public static Acd FromDirectory(string dir) {
            if (!Directory.Exists(dir)) {
                throw new DirectoryNotFoundException(dir);
            }

            var acd = new Acd(dir);
            foreach (var file in Directory.GetFiles(dir)) {
                acd.SetEntry(Path.GetFileName(file), File.ReadAllBytes(file));
            }

            return acd;
        }