File: SetAttributes

SetAttributes

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



 Public Sub SetAttributes(
	  ByRef Path As String,
	  ByVal Attributes As FileAttributes )

Parameters

Path
[ByRef] 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 CorLib Overview

Class File Overview