Table of Contents

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 string

The path in the file system to search for. Can contain wildcards in the last file/folder name part, like 'C:\temp*.png'

pMode PolarFileInfos.Mode

The search mode (search for files and/or folders)

Properties

Count

Returns the number of items in the collection.

public int Count { get; }

Property Value

int

this[object]

This default property returns an item from this collection.

public PolarFileInfo this[object pIndex] { get; }

Parameters

pIndex object

The 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

string

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 string

The name to search for.

Returns

bool

True if an item with the specified name was found.

GetEnumerator()

The enumerator.

public IEnumerator GetEnumerator()

Returns

IEnumerator

TryGet(object)

Tries to get an item from this collection.

public PolarFileInfo TryGet(object pIndex)

Parameters

pIndex object

The 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.