public sealed class WindowsShareClient Local or remote SMB share administration using generated NetAPI bindings and the current Windows identity.
Constructors
WindowsShareClient
public WindowsShareClient(string? server = null) Creates a share client; null targets the local computer.
Methods
Create
public void Create(ShareSpecification specification) Creates a share. An existing name is a conflict; omitted security uses Windows defaults.
Delete
public bool Delete(string name) Deletes a share. Returns false only if absent.
Enumerate
public ImmutableArray<ShareSummary> Enumerate() Enumerates share summaries. Native enumeration failures remain errors.
Find
public ShareSnapshot? Find(string name) Reads share metadata and its nullable stored security descriptor. Null means the share is absent.
Update
public void Update(string name, ShareUpdate update) Updates supplied fields, retaining omitted security. Multiple native changes are not transactional.