对路径访问拒绝,要加上具体filename/c.png

string strPath = Path.Combine(FilePath,
                DateTime.Now.ToString("yyyy-MM-dd"));

            if (!Directory.Exists(strPath))
            {
                Directory.CreateDirectory(strPath);//不存在就创建文件夹
            }

            bool flag = false;
            using (FileStream fs = new FileStream(strPath+"/c.png", FileMode.Create, FileAccess.Write))

 

posted @ 2018-06-06 15:58  zklve2  阅读(128)  评论(0编辑  收藏  举报