Skip to content

SetAttribute Method ​

Definition ​

  • Namespace: JASE.IO
  • Assembly: JASE.dll

bool SetAttribute(string path, FileAttributes attrib, bool recurseDirectory = null) ​

csharp
bool SetAttribute(string path, FileAttributes attrib, bool recurseDirectory = null)

Sets a file attribute on the specified file or, optionally, on all files within a directory tree.

Parameters ​

NameDescription
attribThe file attributes to apply.
pathThe file or directory path.
recurseDirectoryIf and path is a directory, the attribute is applied to all files in the directory and its subdirectories.

Returns ​

if the attribute was successfully applied to all targeted files; if one or more operations failed.