Example #1
0
        private VMNode PopulateNodesFromDirectory(FileDirectory fileDirectory)
        {
            VMNode root = new VMNode();

            root.Name     = fileDirectory.directory;
            root.FilePath = fileDirectory.directory;
            List <string> files = fileLoader.LoadFiles(fileDirectory.directory);

            //List<string> files = tool.LoadAudioFiles(fileDirectory.directory, SearchOption.AllDirectories);
            if (files.Count == 0)
            {
                return(null);
            }

            fileDirectory.Clear();
            fileDirectory.AddRange(files);

            foreach (string f in fileDirectory)
            {
                root.BuildChildNodes(fileDirectory.directory, f, f);
            }

            root.SortNodes();
            return(root);
        }
Example #2
0
        private VMNode PopulateNodesFromFileDirectory(FileDirectory fileDirectory)
        {
            VMNode root = new VMNode();

            root.Name     = fileDirectory.directory;
            root.FilePath = fileDirectory.directory;
            if (fileDirectory.Count == 0)
            {
                return(null);
            }

            foreach (string f in fileDirectory)
            {
                root.BuildChildNodes(fileDirectory.directory, f, f);
            }

            root.SortNodes();
            return(root);
        }