Method | Description | |
---|---|---|
FileAttributeArchiveClear ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus |
Clear the Archive FileAttributes on a file.
|
|
FileAttributeArchiveReinstate ( FileInfo pfi, FileInfoExtension.enmInitialStatus penmInitialStatus ) : FileInfoExtension.enmInitialStatus |
Reinstate the Archive flag on the specified file.
|
|
FileAttributeArchiveSet ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus |
Set the Archive FileAttributes on a file.
|
|
FileAttributeClear ( FileInfo pfi, FileAttributes penmFileAttributes ) : FileInfoExtension.enmInitialStatus |
Clear the specified FileAttributes bit(s).
|
|
FileAttributeHiddenClear ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus |
Clear the Hidden FileAttributes on a file.
|
|
FileAttributeHiddenSet ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus |
Set the Hidden FileAttributes on a file.
|
|
FileAttributeHiddeneReinstate ( FileInfo pfi, FileInfoExtension.enmInitialStatus penmInitialStatus ) : FileInfoExtension.enmInitialStatus |
Reinstate the Hidden flag on the specified file.
|
|
FileAttributeReadOnlyClear ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus |
Clear the ReadOnly FileAttributes on a file.
|
|
FileAttributeReadOnlyReinstate ( FileInfo pfi, FileInfoExtension.enmInitialStatus penmInitialStatus ) : FileInfoExtension.enmInitialStatus |
Reinstate the ReadOnly flag on the specified file.
|
|
FileAttributeReadOnlySet ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus |
Set the ReadOnly FileAttributes on a file.
|
|
FileAttributeSet ( FileInfo pfi, FileAttributes penmFileAttributes ) : FileInfoExtension.enmInitialStatus |
Set the specified FileAttributes bit(s).
|
|
FileAttributeSystemClear ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus |
Clear the System FileAttributes on a file.
|
|
FileAttributeSystemReinstate ( FileInfo pfi, FileInfoExtension.enmInitialStatus penmInitialStatus ) : FileInfoExtension.enmInitialStatus |
Reinstate the System flag on the specified file.
|
|
FileAttributeSystemSet ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus |
Set the System FileAttributes on a file.
|
|
ShowFileDetails ( FileInfo pfi, FileDetailsToShow penmFileDetailsToShow = FileDetailsToShow.Everything, string pstrLabel = null, bool pfPrefixWithNewline = false, bool pfSuffixWithNewline = false ) : string |
This is a general-purpose method for reporting details about a file.
|
Method | Description | |
---|---|---|
ComputeLengthToReport ( FileInfo pfi ) : string |
The cleanest way to handle this special case is by way of a private method that takes the whole FileInfo reference, since the outcome is dependent upon the value of its Exists property, along with the more obvious dependency upon the Length property.
|
|
ComputeTokenEnd ( int pintPosTokenBegin, int pintPosTokenEnd, string pstrToken ) : int |
Given pintPosTokenBegin, the position of the beginning of a substring, pintPosTokenEnd, the position of the token that marks the end of the substring, and the token, itself, represented by pstrToken, from which to determine its length, return the length of the substring, inclusive of its terminal token. Though intended for use by the static constructor, this method may warrant being exposed as a public static method for wider use. |
|
FileInfoExtensionMethods ( ) : System |
public static FileAttributeArchiveClear ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeArchiveReinstate ( FileInfo pfi, FileInfoExtension.enmInitialStatus penmInitialStatus ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
penmInitialStatus | FileInfoExtension.enmInitialStatus | /// Specify the FileInfoExtension.enmInitialStatus value returned by the last call to /// FileAttributeArchiveClear. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeArchiveSet ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeClear ( FileInfo pfi, FileAttributes penmFileAttributes ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
penmFileAttributes | FileAttributes | /// This argument specifies the member(s) of the FileAttributes bitwise /// enumeration to clear. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeHiddenClear ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeHiddenSet ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeHiddeneReinstate ( FileInfo pfi, FileInfoExtension.enmInitialStatus penmInitialStatus ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
penmInitialStatus | FileInfoExtension.enmInitialStatus | /// Specify the FileInfoExtension.enmInitialStatus value returned by the last call to /// FileAttributeArchiveClear. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeReadOnlyClear ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeReadOnlyReinstate ( FileInfo pfi, FileInfoExtension.enmInitialStatus penmInitialStatus ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
penmInitialStatus | FileInfoExtension.enmInitialStatus | /// Specify the FileInfoExtension.enmInitialStatus value returned by the last call to /// FileAttributeArchiveClear. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeReadOnlySet ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeSet ( FileInfo pfi, FileAttributes penmFileAttributes ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
penmFileAttributes | FileAttributes | /// This argument specifies the member(s) of the FileAttributes bitwise /// enumeration to clear. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeSystemClear ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeSystemReinstate ( FileInfo pfi, FileInfoExtension.enmInitialStatus penmInitialStatus ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
penmInitialStatus | FileInfoExtension.enmInitialStatus | /// Specify the FileInfoExtension.enmInitialStatus value returned by the last call to /// FileAttributeArchiveClear. /// |
return | FileInfoExtension.enmInitialStatus |
public static FileAttributeSystemSet ( FileInfo pfi ) : FileInfoExtension.enmInitialStatus | ||
pfi | FileInfo | /// As an extension method, the first argument must be a reference to /// the instance that invoked it, which is used in much the same way as /// the implicit this parameter that leads the list of parameters for a /// call to any C# instance method. /// |
return | FileInfoExtension.enmInitialStatus |
public static ShowFileDetails ( FileInfo pfi, FileDetailsToShow penmFileDetailsToShow = FileDetailsToShow.Everything, string pstrLabel = null, bool pfPrefixWithNewline = false, bool pfSuffixWithNewline = false ) : string | ||
pfi | FileInfo | /// The framework supplies a reference to the FileInfo instance with /// which the call is associated. /// |
penmFileDetailsToShow | FileDetailsToShow | /// Use one or more members of the FileDetailsToShow enumeration to /// specify the details to display. The FileDetailsToShow enumeration is /// a bit mask, and the enumeration defines the combinations that are /// most likely to be useful as additional members. /// /// The default value is FileDetailsToShow.Everything. /// |
pstrLabel | string | /// The label string is optional and, if specified, appears at the start /// of the returned string. String magic is thereafter employed to keep /// subsequent lines of text aligned vertically. /// /// The default value is NULL, which resolves internally to the empty /// string. /// |
pfPrefixWithNewline | bool |
/// If TRUE, the whole string begins with a platform-dependent newline.
/// Otherwise, the string begins with the label specified by parameter
/// |
pfSuffixWithNewline | bool |
/// If TRUE, the string is terminated with a platform-dependent newline.
/// Otherwise, the string ends with the last value specified by the
/// |
return | string |