Class PolarFileInfos
- Namespace
- PolarStudioGlobals
- Assembly
- PolarStudioGlobals.dll
This class contains info about files and/or folders in a requested folder.
public class PolarFileInfos : IEnumerable
- Inheritance
-
PolarFileInfos
- Implements
- Inherited Members
- Extension Methods
Constructors
PolarFileInfos(string, Mode)
Creates a new PolarFilesInfo for the specified path and mode
public PolarFileInfos(string pPath, PolarFileInfos.Mode pMode = Mode.FilesOnly)
Parameters
pPath
stringThe path in the file system to search for. Can contain wildcards in the last file/folder name part, like 'C:\temp*.png'
pMode
PolarFileInfos.ModeThe search mode (search for files and/or folders)
Properties
Count
Returns the number of items in the collection.
public int Count { get; }
Property Value
this[object]
This default property returns an item from this collection.
public PolarFileInfo this[object pIndex] { get; }
Parameters
pIndex
objectThe index for the item to get. Use 1-based index or file/folder name.
Property Value
- PolarFileInfo
The found item. Throws an exception if out of bounds or not found.
Path
Returns the path that was used to create this object.
public string Path { get; }
Property Value
Methods
ContainsKey(string)
Returns a boolean indicating if the item with the specified name is found in the collection.
public bool ContainsKey(string pKey)
Parameters
pKey
stringThe name to search for.
Returns
- bool
True if an item with the specified name was found.
GetEnumerator()
The enumerator.
public IEnumerator GetEnumerator()
Returns
TryGet(object)
Tries to get an item from this collection.
public PolarFileInfo TryGet(object pIndex)
Parameters
pIndex
objectThe index for the item to get. Use 1-based index or file/folder name.
Returns
- PolarFileInfo
The found item or Nothing if not found or out of bounds.