Introduction
With File.SetAttributes we can modify some file permissions, such as ReadOnly or ReadWrite, but we can't set Executable (a.k.a. 7) permission. I think we have everything we need on FileStatus.Unix.cs so we can do something like:
File.SetAttributes(path, FileAttributes.Executable);
It should call chmod setting a 7.
Usage
Some possible usage is when you need to download a zip file. You know that you have an app inside, but you need to change the mode to 7 to be able to execute it.
Introduction
With File.SetAttributes we can modify some file permissions, such as ReadOnly or ReadWrite, but we can't set Executable (a.k.a. 7) permission. I think we have everything we need on FileStatus.Unix.cs so we can do something like:
It should call chmod setting a 7.
Usage
Some possible usage is when you need to download a zip file. You know that you have an app inside, but you need to change the mode to 7 to be able to execute it.