サーバークライアントアプリケーションがあります。ファイルマネージャーです
。システムフォルダーなどのアクセス制御が必要なフォルダー内に入ると、読み取り専用になりますが、新しいフォルダーを移動/削除または作成する必要があります。どうすればよいですか。それを行う許可を得ますか?
サーバー側で新しいフォルダを作成する方法は次のとおりです
public void NewFolder(string path)
{
try
{
string name = @"\New Folder";
string current = name;
int i = 0;
while (Directory.Exists(path + current))
{
i++;
current = String.Format("{0} {1}", name, i);
}
Directory.CreateDirectory(path + current);
Explore(path); //this line is to refresh the items in the client side after creating the new folder
}
catch (Exception e)
{
sendInfo(e.Message, "error");
}
}