aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-11-25 17:52:49 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-11-25 17:52:49 +0200
commit9277bbd2fa070c69b83904f8fe5628fab2b947b8 (patch)
tree3099f9ce92f04c28517eb13938e913a1e376b3fe /Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs
parentf779e2b6f0bb1dedc7644c64651b59e31ce62c00 (diff)
downloadTango-9277bbd2fa070c69b83904f8fe5628fab2b947b8.tar.gz
Tango-9277bbd2fa070c69b83904f8fe5628fab2b947b8.zip
Working on job export import to storage.
Diffstat (limited to 'Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs')
-rw-r--r--Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs b/Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs
index 48f870b20..dde105767 100644
--- a/Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs
+++ b/Software/Visual_Studio/Tango.Explorer/ExplorerFolderItem.cs
@@ -12,7 +12,7 @@ namespace Tango.Explorer
{
public class ExplorerFolderItem : ExplorerItem
{
- private static List<String> extensions = ExplorerFileDefinition.GetSupportedExtensions().Select(x => x.Replace(".","")).ToList();
+ private static List<String> extensions = ExplorerFileDefinition.GetSupportedExtensions().Select(x => x.Replace(".", "")).ToList();
public List<ExplorerItem> Items { get; set; }
@@ -21,7 +21,7 @@ namespace Tango.Explorer
Items = new List<ExplorerItem>();
}
- public static ExplorerFolderItem LoadFromPath(String path)
+ public static ExplorerFolderItem LoadFromPath(String path, String filter)
{
ExplorerFolderItem folderItem = new ExplorerFolderItem();
@@ -38,9 +38,12 @@ namespace Tango.Explorer
folderItem.Items.Add(fItem);
}
- foreach (var file in Directory.GetFiles(path,"*.*").Where(f => extensions.Contains(f.Split('.').Last().ToLower())).ToArray())
+ foreach (var file in Directory.GetFiles(path, "*.*").Where(f => extensions.Contains(f.Split('.').Last().ToLower())).ToArray())
{
- folderItem.Items.Add(ExplorerFileItem.LoadFromPath(file));
+ if (filter == null || filter.ToLower().Replace("*", "").Replace(";", "").Split('|').Contains(System.IO.Path.GetExtension(file).ToLower()))
+ {
+ folderItem.Items.Add(ExplorerFileItem.LoadFromPath(file));
+ }
}
return folderItem;