private bool isTopLevel(VirtualFolderMediaLocation location, string changed) { if (location != null) { foreach (var dir in location.VirtualFolder.Folders) { if (dir.ToLower() == changed) { return(true); } } } return(false); }
public IMediaLocation Create(string path) { Debug.Assert(path != null); if (path == null) return null; if (Helper.IsShortcut(path)) { path = Helper.ResolveShortcut(path); } IMediaLocation location = null; if (Directory.Exists(path)) { var info = new DirectoryInfo(path).ToFileInfo(); location = new FolderMediaLocation(info, null); } else if (File.Exists(path)) { var info = new System.IO.FileInfo(path).ToFileInfo(); if (path.ToLower().EndsWith(".vf")) { location = new VirtualFolderMediaLocation(info, null); } else { location = new MediaLocation(info, null); } } return location; }
private bool isTopLevel(VirtualFolderMediaLocation location, string changed) { if (location != null) { foreach (var dir in location.VirtualFolder.Folders) { if (dir.ToLower() == changed) return true; } } return false; }