Click or drag to resize

ItemCreate Method

Create an item from a name and other parameters. Pass STGM_CREATE for mode parameter to create an item that doesn't necessarily exist.

Namespace:  ShellBoost.Core.WindowsShell
Assembly:  ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax
C#
public static Item Create(
	string name,
	STGM? mode = null,
	long? length = null,
	FileAttributes? attributes = null,
	DateTime? lastWriteTime = null,
	DateTime? creationTime = null,
	DateTime? lastAccessTime = null,
	Action<IBindCtx> bindContextConfig = null,
	bool throwOnError = true
)

Parameters

name
Type: SystemString
The name.
mode (Optional)
Type: SystemNullableSTGM
The file access mode.
length (Optional)
Type: SystemNullableInt64
The item length.
attributes (Optional)
Type: SystemNullableFileAttributes
The file attributes.
lastWriteTime (Optional)
Type: SystemNullableDateTime
The last write time.
creationTime (Optional)
Type: SystemNullableDateTime
The creation time.
lastAccessTime (Optional)
Type: SystemNullableDateTime
The last access time.
bindContextConfig (Optional)
Type: SystemActionIBindCtx
A bind context function.
throwOnError (Optional)
Type: SystemBoolean
true to throw error; otherwise false.

Return Value

Type: Item
An instance of the Item class or null if an error occurred.
Exceptions
ExceptionCondition
ArgumentNullExceptionname is null.
See Also