public DrawableFolder(DirectoryInfo parent, DrawableFolders drawable) { _parent = parent; _drawable = drawable; Directory = new DirectoryInfo(Path.Combine(parent.FullName, drawable.ToPath())); if (this.Exists) { Resources = new HashSet <string>(Directory.GetFiles().Select(f => f.Name)); } else { Resources = new HashSet <string>(); } }
public static string ToPath(this DrawableFolders size) { switch (size) { case DrawableFolders.drawable: return("drawable"); case DrawableFolders.ldpi: return("drawable-ldpi"); case DrawableFolders.mdpi: return("drawable-mdpi"); case DrawableFolders.hdpi: return("drawable-hdpi"); case DrawableFolders.xhdpi: return("drawable-xhdpi"); case DrawableFolders.xxhdpi: return("drawable-xxhdpi"); case DrawableFolders.xxxhdpi: return("drawable-xxxhdpi"); default: throw new ArgumentOutOfRangeException(size.ToString()); } }