Click or drag to resize

FileSetAttributesTransacted Method (KernelTransaction, String, FileAttributes)

[AlphaFS] Sets the specified FileAttributes of the file on the specified path.

Namespace:  Alphaleonis.Win32.Filesystem
Assembly:  AlphaFS (in AlphaFS.dll) Version: 2.2
Syntax
public static void SetAttributesTransacted(
	KernelTransaction transaction,
	string path,
	FileAttributes fileAttributes
)

Parameters

transaction
Type: Alphaleonis.Win32.FilesystemKernelTransaction
The transaction.
path
Type: SystemString
The path to the file.
fileAttributes
Type: System.IOFileAttributes
A bitwise combination of the enumeration values.
Exceptions
ExceptionCondition
ArgumentExceptionpath is empty, contains only white spaces, contains invalid characters, or the file attribute is invalid.
DirectoryNotFoundExceptionThe specified path is invalid, (for example, it is on an unmapped drive).
FileNotFoundExceptionThe file cannot be found.
NotSupportedExceptionpath is in an invalid format.
UnauthorizedAccessExceptionpath specified a file that is read-only. -or- This operation is not supported on the current platform. -or- path specified a directory. -or- The caller does not have the required permission.
Remarks
Certain file attributes, such as Hidden and ReadOnly, can be combined. Other attributes, such as Normal, must be used alone.
Remarks
It is not possible to change the Compressed status of a File object using this method.
See Also