FtpItemCollection Class
Namespace: Rebex.Net
Assembly: Rebex.Ftp.dll (version 8.0.9673)
Provides a container for a collection of FtpItem objects.
Syntax
public class FtpItemCollection : ICollection, ICollection<FtpItem>, IEnumerable<FtpItem>, IEnumerable
Inherited Members
Constructors
| Name | Description |
|---|---|
| FtpItemCollection() | Initializes a new instance of the FtpItemCollection class. |
| FtpItemCollection(String[]) | Initializes a new instance of the FtpItemCollection class with the specified file list. |
| FtpItemCollection(String[], FtpListingType) | Initializes a new instance of the FtpItemCollection class with the specified file list. |
Properties
| Name | Description |
|---|---|
| Count | Gets the number of elements contained in the collection. |
| Item[Int32] | Gets the item at the specified index. |
| Item[String] | Gets the item of the specified path. |
| SyncRoot | Gets an object that can be used to synchronize access to the collection. |
| UsePath | Gets or sets a value that indicates whether to use a Path or Name for pattern matching and return values in the GetFiles(Regex) method. |
Methods
| Name | Description |
|---|---|
| Add(FtpItem) | Adds the specified item to the collection. |
| AddRange(IEnumerable<FtpItem>) | Adds the elements of the specified collection to the end of the FtpItemCollection. |
| CheckItem(FileSystemItem) | Validates whether the item is correct and can be added. |
| Clear() | Removes all items from the collection. |
| Clone() | Creates a shallow copy of the collection. |
| Contains(FtpItem) | Determines whether the item is in the collection. |
| Contains(String) | Determines whether the item with the specified path is in the collection. |
| CopyTo(FtpItem[], Int32) | Copies the range of elements from the collection to a one-dimensional FtpItem array, starting at the specified index of the target array. |
| CopyTo(Array, Int32) | Copies the range of elements from the collection to a compatible one-dimensional Array, starting at the specified index of the target array. |
| GetEnumerator() | Gets an IEnumerator<T> for the collection. |
| GetFiles(String) | Returns the names of files in the collection that match the specified search pattern. |
| GetFiles(String, Boolean) | Returns the names of files in the collection that match the specified search pattern. |
| GetFiles(Regex) | Returns the paths of files in the collection that match the specified search pattern. |
| GetTotalSize() | Gets the total size of files contained in the collection. |
| Remove(FtpItem) | Removes the specified item from the collection. Fails if not found. |
| Remove(String) | Removes the item with the specified path from the collection. |
| RemoveAt(Int32) | Removes the item at the specified index from the collection. |
| Sort() | Sorts the items in the entire collection alphabetically. |
| Sort(IComparer) | Sorts the elements in the entire collection using the specified comparer. |
| Sort(Int32, Int32, IComparer) | Sorts the elements in a section of the collection using the specified comparer. |
Operators
| Name | Description |
|---|---|
| Explicit(FileSystemItemCollection to FtpItemCollection) | Casts the FileSystemItemCollection back to FtpItemCollection.
The conversion will work only if |
| Implicit(FtpItemCollection to FileSystemItemCollection) | Casts the collection to FileSystemItemCollection using a wrapper object. |
Explicit Interface Implementations
| Name | Description |
|---|---|
| ICollection<FtpItem>.IsReadOnly | Gets a value indicating whether the collection is read-only. |
| ICollection<FtpItem>.Remove(FtpItem) | Removes the specified item from the collection. |
| IEnumerable.GetEnumerator() | Returns an enumerator that can iterate through the collection. |