[This is preliminary documentation and is subject to change.]

When overriden in derived class called to set the value of a specific field for a given file, e.g. to change the date field of a file.

Namespace: Tools.TotalCommanderT
Assembly: Tools.TotalCommander (in Tools.TotalCommander.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
[MethodNotSupportedAttribute]
public virtual void SetValue(
	string FileName,
	int FieldIndex,
	int UnitIndex,
	Object value,
	SetValueFlags flags
)
Visual Basic
<MethodNotSupportedAttribute> _
Public Overridable Sub SetValue ( _
	FileName As String, _
	FieldIndex As Integer, _
	UnitIndex As Integer, _
	value As Object, _
	flags As SetValueFlags _
)
Visual C++
[MethodNotSupportedAttribute]
public:
virtual void SetValue(
	String^ FileName, 
	int FieldIndex, 
	int UnitIndex, 
	Object^ value, 
	SetValueFlags flags
)
F#
[<MethodNotSupportedAttribute>]
abstract SetValue : 
        FileName:string * 
        FieldIndex:int * 
        UnitIndex:int * 
        value:Object * 
        flags:SetValueFlags -> unit 
[<MethodNotSupportedAttribute>]
override SetValue : 
        FileName:string * 
        FieldIndex:int * 
        UnitIndex:int * 
        value:Object * 
        flags:SetValueFlags -> unit 
JScript
public function SetValue(
	FileName : String, 
	FieldIndex : int, 
	UnitIndex : int, 
	value : Object, 
	flags : SetValueFlags
)

Parameters

FileName
Type: System..::..String
The name of the file (for File System plugins in plugin namespace) for which the plugin needs to change the field data.

This is set to null to indicate the end of change attributes.

FieldIndex
Type: System..::..Int32
The index of the field for which the content has to be returned. This is the same index as the FieldIndex value in array returned by SupportedFields. This is set to -1 to signal the end of change attributes.
UnitIndex
Type: System..::..Int32
The index of the unit used. If no unit string was returned by SupportedFields, UnitIndex is 0.
value
Type: System..::..Object
Here the plugin receives the data to be changed. The type depends on the field type. Field type is inferred from FieldType. When [M:Tools.TotalCommanderT.ContentPluginBase.GetValue(System.String,System.Int32,System.Int32,System.Int32,Tools.TotalCommanderT.GetFieldValueFlags,System.Nullable`1{System.Double})] returns different type it may be passed here as well.

Data types are

Data type passedCorresponding field typeBooleanBoolean()()()()DateDate()()()()DateTimeDateAndTime()()()()DoubleDouble()()()()Array of String (usually one item; in fact string passed by Total Commander split by ", " (comma+space))Enum()()()()Array of ByteFullText()()()() (Total Commander never passes that)Int32Integer32()()()()Int64Integer64()()()()StringString()()()()TimeSpanTime()()()()IntPtrTotal Commander have passed unknown type (should not happen)
flags
Type: Tools.TotalCommanderT..::..SetValueFlags

[Missing <param name="flags"/> documentation for "M:Tools.TotalCommanderT.ContentPluginBase.SetValue(System.String,System.Int32,System.Int32,System.Object,Tools.TotalCommanderT.SetValueFlags)"]

Remarks

Note
About caching the data: Total Commander will not call a mix SetValue(String, Int32, Int32, Object, SetValueFlags) for different files, it will only call it for the next file when the previous file can be closed. Therefore a single cache per running Total Commander should be sufficient.
Note
About the flags: If the flagsFirst and Last are both set, then this is the only attribute of this plugin which is changed for this file.

FileName is set to NULL and FieldIndex to -1 to signal to the plugin that the change attributes operation has ended. This can be used to flush unsaved data to disk, e.g. when setting comments for multiple files.

Exceptions

ExceptionCondition
System..::..NotSupportedExceptionThe actual implementation is marked with MethodNotSupportedAttribute.
System.IO..::..IOExceptionAn error ocured while writing the data to file
System..::..ArgumentOutOfRangeExceptionFieldIndex is out of ragne of fields returned by SupportedFields

See Also

Collapse/expand Version History

1.5.3

  • This function is new in version 1.5.3