/// <summary> /// Gets the list of obsolete subfolders. /// Returns false if project path is unknown. /// </summary> public bool GetObsoleteSubfolders(string projectPath, out List <string> obsoleteSubfolders) { obsoleteSubfolders = new List <string>(); var projectName = Path.GetFileName(projectPath); List <string> releases; bool ok = m_releaserClient.GetReleases(projectName, out releases); if (!ok) { return(false); } obsoleteSubfolders = ObsoleteHelper.GetObsoletePaths( Directory.GetDirectories(projectPath), releases, Arguments.DaysToLive); return(true); }
/// <summary> /// Gets the list of obsolete subfolders. /// Returns false if project path is unknown. /// </summary> public bool GetObsoleteSubfolders(string projectPath, out List <string> obsoleteSubfolders) { string projectFolder = Path.GetFileName(projectPath); string latestVersion = ReferenceFolder.GetLatestVersion( Arguments.InternalReferencesPath, projectFolder); string latestFolderName = Path.GetFileName( ReferenceFolder.GetLatestPath( Arguments.InternalReferencesPath, projectFolder)); obsoleteSubfolders = ObsoleteHelper.GetObsoletePaths( Directory.GetDirectories(projectPath), new List <string> { latestVersion, latestFolderName }, Arguments.DaysToLive); return(true); }