public static bool cdir(string xmmc)
{
bool flag = false;
DirectoryInfo aimpath = new DirectoryInfo(@"\\192.168.1.217\共享文件夹 ");
if (connectstat(aimpath.ToString(), "username", "password"))
{
DirectoryInfo pdir = new DirectoryInfo(@"\\192.168.1.217\共享文件夹\" + xmmc);
if (!pdir.Exists)
{
pdir.Create();
flag = true;
}
else
{
MessageBox.Show("文件夹已存在,请检查。");
}
}
return flag;
}