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:
callback.ShellBoost.Core.WindowsShell
Assembly:
callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.0
Syntaxpublic 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: System.String
The name. - mode (Optional)
- Type: System.Nullable<STGM>
The file access mode. - length (Optional)
- Type: System.Nullable<Int64>
The item length. - attributes (Optional)
- Type: System.Nullable<FileAttributes>
The file attributes. - lastWriteTime (Optional)
- Type: System.Nullable<DateTime>
The last write time. - creationTime (Optional)
- Type: System.Nullable<DateTime>
The creation time. - lastAccessTime (Optional)
- Type: System.Nullable<DateTime>
The last access time. - bindContextConfig (Optional)
- Type: System.Action<IBindCtx>
A bind context function. - throwOnError (Optional)
- Type: System.Boolean
true to throw error; otherwise false.
Return Value
Type:
ItemAn instance of the Item class or null if an error occurred.
Exceptions
See Also