Click or drag to resize

PathCollection Class

A class that allows to store paths and prevents duplicates
Inheritance Hierarchy

Namespace:  Jam.Shell
Assembly:  ShellBrowser.Core (in ShellBrowser.Core.dll) Version: 6.1
Syntax
[SerializableAttribute]
public class PathCollection : NameObjectCollectionBase, 
	ICollection<string>, IEnumerable<string>, IEnumerable, 
	IDisposable

The PathCollection type exposes the following members.

Constructors
  NameDescription
Public methodPathCollection
Initializes a new instance of the PathCollection class
Public methodPathCollection(IEnumerableString)
Initializes a new instance of the PathCollection class and fills it with the given enumerable string collection.
Public methodPathCollection(StringCollection)
Initializes a new instance of the PathCollection class and fills it with the given StringCollection
Public methodPathCollection(String)
Initializes a new instance of the PathCollection class and fills it with the given String.
Public methodPathCollection(JamItemIdListCollection)
Initializes a new instance of the PathCollection class and fills it with the given enumerable ItemIdList collection.
Top
Properties
  NameDescription
Public propertyAllowDuplicates
Gets or sets a value indicating whether to allow duplicate entries in the list.
Public propertyCheckIfExists
If true, paths that do not exist will not be added to the list
Public propertyIsReadOnly
Gets a value indicating whether the collection is read-only.
Public propertyItem
Returns a path with a certain index.
Top
Methods
  NameDescription
Public methodAdd(IEnumerable)
Add all items of the given enumrable class to the list.
Public methodAdd(String)
Adds the given path to the list of path.
Public methodAdd(IEnumerableIJamItemIdList)
Adds the paths of the passed ItemIdLists to the list.
Protected methodAddPath
Adds the given path to the list of path. It does not fire the Changing and Change event.
Public methodClear
Removes all elements from the list
Public methodClone
Creates a copy of the current PathCollection
Public methodContains
Returns true if the given path is in the list
Public methodCopyTo
Copies the elements of the PathCollection to an Array, starting at a particular Array index.
Public methodDelete
Removes the path with the given index from the list.
Public methodDispose
Releases ressources.
Protected methodDispose(Boolean)
Releases managed ressources.
Public methodStatic memberExcludeTrailingPathDelimiter
Makes sure that the given paths does not end with System.IO.Path.DirectorySeperatorChar.
Public methodStatic memberFileOrFolderExists
Checks if the given path exists.
Public methodStatic memberGetDomainFromUNCPath
Returns the domain name from a UNC path
Public methodStatic memberGetFileSize
Gets the file size in byte.
Public methodStatic memberGetFolderSize(String)
Returns the size of a folder, including all files in all subfolders.
Public methodStatic memberGetFolderSize(String, Int32, Int32)
Returns the size of a folder, including all files in all subfolders, and the file count.
Public methodStatic memberGetFolderSize260
Returns the size of a folder, including all files in all subfolders, and the file count for paths that don't contain folders longer than 260 characters, this is the old implementation that was used in ShellBrowser.Net up to and including version 4.0.0.3
Public methodStatic memberGetLongPath
A wrapper for ShellApi.GetLongPathName
Public methodStatic memberGetParentPathFromPath
Returns the parent path of the given path.
Public methodStatic memberGetUNCPathFromMappedDrive
This method needs the mpr.dll to work. (UNCPath length = max 1024 chars) This method should only be used with mapped drives, e.g. for a fixed drive an IOException occurs (Not Connected) See DriveType to determine whether the drive is a network share.
Public methodStatic memberIncludeTrailingPathDelimiter
Makes sure that the given paths end with System.IO.Path.DirectorySeparatorChar.
Public methodIndexOf
Returns the index of the given path.
Public methodStatic memberIsAbsolutePath
Determines if the given path is absolute.s
Public methodStatic memberIsDrive
Checks if the given path is a drive.
Public methodStatic memberIsLocalPath
Checks if the given path is an absolute local path (including mapped network drives), i.e. if it starts with a drive letter and is followed by a colon and a backslash ("c:\")
Public methodStatic memberCode exampleIsSubPathOf
Checks if a given path is a parent path of the other given path.
Public methodStatic memberIsUNCPath
Checks if the given path is a UNC path like \\Server\share. It does not check if the path really exists. see also http://msdn2.microsoft.com/en-us/library/aa365247.aspx#maximum_path_length
Public methodObjects
Returns the object associated with a path.
Protected methodOnChanged
Fires the Change event.
Protected methodOnChanging
Fires the Changing event.
Public methodPathWasRenamed
Call this method to update the collection, e.g. upon path rename.
Public methodRemove
Removes a path from the list.
Public methodStatic memberSamePath
Checks if two paths are identical
Public methodToString
Override the inherited method ToString().
(Overrides ObjectToString.)
Public methodStatic memberUnifyPath
Brings the path into a unified format. This makes it easier to eliminate duplicates.
Public methodUpdate
Updates the object associated with a path.
Top
Events
  NameDescription
Public eventChange
This event gets fired after items were added or deleted.
Public eventChanging
This event gets fired before items are added or deleted.
Top
Fields
  NameDescription
Public fieldStatic memberDOUBLE_SLASH
Contains a pair of slashes as it appears at the beginning of UNC paths.
Protected fieldm_AllowDuplicates
Normally list only takes unique paths. In certain cases (e.g. in the BeforeShellDrop/OperationPerformed EventArgs, allowing duplicates is required).
Protected fieldm_UpdateCounter
Indicates whether the list is changing at the moment; bug #9923
Top
See Also