.NET Coreのファイルのアクセス許可を変更しようとしています。 しかし、FileInfoにはSetAccessControl
がもう存在しないようです。.NETコアのファイルアクセス制御を変更する方法
// Create a new FileInfo object.
FileInfo fInfo = new FileInfo(FileName);
// Get a FileSecurity object that represents the
// current security settings.
FileSecurity fSecurity = fInfo.GetAccessControl();
// Add the FileSystemAccessRule to the security settings.
fSecurity.AddAccessRule(new FileSystemAccessRule(Account,
Rights,
ControlType));
// Set the new access settings.
fInfo.SetAccessControl(fSecurity);
目的は、ファイルの現在の所有者(WindowsまたはUnix固有の機能ではない)に実行権を追加することです。
.NET Coreでこれを行う方法に関する手がかりはありますか?
アクセス制御システムが異なるUnixでは、どのようなことが起こると思いますか?またはこれはWindows専用の.Netコアアプリケーションですか? – svick
@svick私は共通のサブセットのようなものを期待しています。私はMonoで何が完了したのか確認します。 – Fab