File: SetAttributes

SetAttributes

Sets the file attributes (ReadOnly, Hidden, ...)

 Public Sub SetAttributes(
	  ByVal sPath As String,
	  ByVal Attributes As FileAttributes )

Parameters

sPath
[ByVal] String. The file to set the attributes of.
Attributes
[ByVal] FileAttributes. The new attributes to set the file to.

Remarks

In order to set a single attribute without unsetting an existing attributes, they will first need to be read from the file (GetAttributes), then bit manipulated to create the resulting set of desired attributes before setting.

See Also

Project VBCorLib Overview | Class File Overview