public override bool TryGetFolder(string path, out FileFolder value) { if (m_root == null) { LoadTree(); } return(m_root.TryGetFolder(path, out value)); }
public override bool TryGetItem(ItemIdentifier ii, out FileFolder ff) { if (ii == null) { ff = m_tree; return(true); } return(m_tree.TryGetFolder(ii.FolderName, out ff)); }
public override bool TryGetItem(ItemIdentifier ii, out FileFolder out_ff) { if (ii != m_ii) { out_ff = null; return(false); } out_ff = m_folder; return(true); }
public override bool TryGetFolder(string path, out FileFolder value) { ItemBankFolder folder; string name; if (!FollowPath(path, out folder, out name) || !folder.m_folders.TryGetValue(name, out value)) { value = null; return(false); } return(true); }
public override bool TryGetFolder(string path, out FileFolder value) { value = null; string physicalPath = ToPhysicalPath(path); if (!Directory.Exists(physicalPath)) { return(false); } string rootedName = ToRootedName(path); string name = ToName(path); value = new FsFolder(physicalPath, rootedName, name); return(true); }
public override bool TryGetItem(ItemIdentifier ii, out FileFolder ff) { try { if (ii == null) // Attempt to get root folder for manifest. Can't do that on an item bank. { ff = null; return(false); } string projectId = m_gitLab.ProjectIdFromName(m_namespace, ii.FullId); ff = new ItemBankProject(this, ii, projectId); return(true); } catch (HttpNotFoundException) { ff = null; return(false); } }
public override bool TryGetFolder(string path, out FileFolder value) { return(mRoot.TryGetFolder(path, out value)); }
/// <summary> /// Gets an item or stimulus in the form of a <see cref="FileFolder`"/> /// </summary> /// <param name="ii">The item ID or null if seeking the root folder.</param> /// <param name="value">Returns the folder if it is found.</param> /// <returns>True if the folder is found. Otherwise, false.</returns> public abstract bool TryGetItem(ItemIdentifier ii, out FileFolder ff);
public FolderItemEnumerator(FileFolder rootFolder) { m_rootFolder = rootFolder; }
// Methods public abstract bool TryGetFolder(string path, out FileFolder value);