public PackageProperties() { Dependencies = new List <string> (); Provides = new List <string> (); FileTree = new DirectoryData(); Type = PackageType.Exe; Version = "1.0"; Release = "1"; License = "Proprietary"; Group = "System/Packages"; Categories = "GNOME"; UseMonoIomap = true; }
private void GetAllDirectories(DirectoryData directory, string path, List <string> output, bool writable) { // Add to the path if (directory.Name != "Application Root") { path += Path.DirectorySeparatorChar + directory.Name; path = path.TrimStart(Path.DirectorySeparatorChar); } // Add this directory if (path.Trim().Length > 0 && (directory.Writable == writable)) { output.Add(path); } // Add child directories foreach (DirectoryData d in directory.Directories) { GetAllDirectories(d, path, output, writable); } }
private string FindStartupExecutable(DirectoryData directory) { foreach (FileData f in directory.Files) { if (f.StartupExecutable) { return(f.Name); } } foreach (DirectoryData d in directory.Directories) { string exe = FindStartupExecutable(d); if (!string.IsNullOrEmpty(exe)) { return(exe); } } return(string.Empty); }
private void GetAllFiles(DirectoryData directory, string path, List <string> output, bool writable) { // Add to the path if (directory.Name != "Application Root") { path += Path.DirectorySeparatorChar + directory.Name; path = path.TrimStart(Path.DirectorySeparatorChar); } // Add child files foreach (FileData file in directory.Files) { if (file.Writeable == writable) { output.Add(Path.Combine(path, file.Name)); } } // Add child directories foreach (DirectoryData d in directory.Directories) { GetAllFiles(d, path, output, writable); } }