Click or drag to resize

FileSystemEntryRunByPathT Method (String, FuncIntPtr, T, FileMode, FileAccess, FileShare, Boolean)

Runs a function on an entry handle opened using its path.

Namespace:  callback.ShellBoost.Core.Utilities
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntax
C#
public static T RunByPath<T>(
	string path,
	Func<IntPtr, T> func,
	FileMode mode = FileMode.Open,
	FileAccess access = FileAccess.Read,
	FileShare share = FileShare.ReadWrite|FileShare.Delete,
	bool throwOnError = true
)

Parameters

path
Type: SystemString
The path to open.
func
Type: SystemFuncIntPtr, T
The action to run.
mode (Optional)
Type: System.IOFileMode
A constant that determines how to open or create the entry.
access (Optional)
Type: System.IOFileAccess
A constant that determines how the entry can be accessed.
share (Optional)
Type: System.IOFileShare
A constant that determines how the entry will be shared by processes.
throwOnError (Optional)
Type: SystemBoolean
true to throw errors; otherwise false.

Type Parameters

T
The return value type.

Return Value

Type: T
The result of the called function, or the default value.
See Also