惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
Engineering at Meta
Engineering at Meta
GbyAI
GbyAI
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
腾讯CDC
U
Unit 42
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Apple Machine Learning Research
Apple Machine Learning Research
M
MIT News - Artificial intelligence
人人都是产品经理
人人都是产品经理
Hugging Face - Blog
Hugging Face - Blog
MyScale Blog
MyScale Blog
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
N
Netflix TechBlog - Medium
阮一峰的网络日志
阮一峰的网络日志
博客园 - Franky
Recent Announcements
Recent Announcements
A
About on SuperTechFans
Stack Overflow Blog
Stack Overflow Blog
The GitHub Blog
The GitHub Blog
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More

博客园 - N/A2011

Managing Hierarchical Data in MySQL php soapclient with wsse 转贴 MySQL Multiple Result Procs in PHP 转贴 jQuery Datepicker by Example 转贴 Using MySQL Stored Procedures with PHP mysql/mysqli/pdo php generate pdf open office (java) ant + emma + junit Copy all files recursively from one folder to another RecursiveFileFinder 转贴: 怎样找第一份工作 PerformanceCounter in .net Trace in .net Logger in .net 转贴: 傅立叶级数(Fourier Series) 推导 CAS in .net Encrypting and Decrypting in .net User and Data Security in .net Unmanaged code in .net
Access Control List in .net
N/A2011 · 2009-05-18 · via 博客园 - N/A2011

VB.NET:

Imports System.Security.AccessControl
Imports System.Security.Policy
Imports System.Security.Principal
Imports System.IO
Module Module1Sub Main()
        
Dim ds As New DirectorySecurity
        ds.AddAccessRule(
New FileSystemAccessRule("Guest", FileSystemRights.Read, AccessControlType.Allow))
        Directory.CreateDirectory(
"c:\Guest", ds)
        File.Create(
"c:\Guest\Data.Data")
    
End SubEnd Module

C#:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Security.AccessControl;
using System.Security.Policy;
using System.Security.Principal;
using System.IO;namespace AccessControlListCS
{
    
class Program
    {
        
static void Main(string[] args)
        {
            DirectorySecurity ds 
= new DirectorySecurity();
            ds.AddAccessRule(
new FileSystemAccessRule("Guest", FileSystemRights.Read, AccessControlType.Allow));
            Directory.CreateDirectory(
@"c:\Guest", ds);
            File.Create(
@"c:\Guest\Data.Data");
        }
    }
}