/// <summary> Add a new file to this collection. </summary> /// <param name="NewFile"> <see cref="DirectoryCrawler_File"/> object for this new file </param> /// <returns> The index for this new included File </returns> /// <example> To see examples, look at the examples listed under the main <see cref="DirectoryCrawler"/> class. </example> public int Add(DirectoryCrawler_File NewFile) { // Add this file to the collection's list int returnVal = List.Add(NewFile); // Return the index which was retrieved when this file was added return(returnVal); }
/// <summary> Remove an existing file from this collection. </summary> /// <param name="FileToRemove"> Included File to remove from this collection. </param> /// <example> To see examples, look at the examples listed under the main <see cref="DirectoryCrawler"/> class. </example> public void Remove(DirectoryCrawler_File FileToRemove) { // Check to see if this exists in the List if (Contains(FileToRemove)) { // It existed, so remove it. List.Remove(FileToRemove); } }
/// <summary> Check to see if an included file object currently exists in this collection. </summary> /// <param name="FileToCheck"> File to check for existence in this collection. </param> /// <returns>TRUE if the provided included file object is already part of this Collection </returns> /// <example> To see examples, look at the examples listed under the main <see cref="DirectoryCrawler"/> class. </example> public bool Contains(DirectoryCrawler_File FileToCheck) { return(List.Contains(FileToCheck)); }