Exemple #1
0
        private static void AddDirectoryTree(Iso9660Generator iso, string root, string virtualPrepend)
        {
            DirectoryInfo dirinfo = new DirectoryInfo(root.Replace('/', '\\'));

            foreach (FileInfo file in dirinfo.GetFiles())
                iso.AddFile(virtualPrepend + file.Name, file);

            foreach (DirectoryInfo dir in dirinfo.GetDirectories()) {
                iso.MkDir(virtualPrepend + dir.Name);
                AddDirectoryTree(iso, root + '/' + dir.Name, virtualPrepend + dir.Name + '/');
            }
        }
Exemple #2
0
        static private void AddDirectoryTree(Iso9660Generator iso, string root, string virtualPrepend)
        {
            DirectoryInfo dirinfo = new DirectoryInfo(root.Replace('/', '\\'));

            foreach (FileInfo file in dirinfo.GetFiles())
            {
                iso.AddFile(virtualPrepend + file.Name, file);
            }

            foreach (DirectoryInfo dir in dirinfo.GetDirectories())
            {
                iso.MkDir(virtualPrepend + dir.Name);
                AddDirectoryTree(iso, root + '/' + dir.Name, virtualPrepend + dir.Name + '/');
            }
        }
Exemple #3
0
        private static void AddDirectoryTree(Iso9660Generator iso, string root, string virtualPrepend)
        {
            if(Environment.OSVersion.Platform == PlatformID.Win32Windows || Environment.OSVersion.Platform == PlatformID.Win32NT)
                root = root.Replace('/', '\\');

            DirectoryInfo dirinfo = new DirectoryInfo(root);

            foreach (FileInfo file in dirinfo.GetFiles())
                iso.AddFile(virtualPrepend + file.Name, file);

            foreach (DirectoryInfo dir in dirinfo.GetDirectories()) {
                iso.MkDir(virtualPrepend + dir.Name);
                AddDirectoryTree(iso, root + '/' + dir.Name, virtualPrepend + dir.Name + '/');
            }
        }
Exemple #4
0
        static private void AddDirectoryTree(Iso9660Generator iso, string root, string virtualPrepend)
        {
            if (Environment.OSVersion.Platform == PlatformID.Win32Windows || Environment.OSVersion.Platform == PlatformID.Win32NT)
            {
                root = root.Replace('/', '\\');
            }

            DirectoryInfo dirinfo = new DirectoryInfo(root);

            foreach (FileInfo file in dirinfo.GetFiles())
            {
                iso.AddFile(virtualPrepend + file.Name, file);
            }

            foreach (DirectoryInfo dir in dirinfo.GetDirectories())
            {
                iso.MkDir(virtualPrepend + dir.Name);
                AddDirectoryTree(iso, root + '/' + dir.Name, virtualPrepend + dir.Name + '/');
            }
        }