检查文件,如果文件不存在则创建

//检查文件,如果文件不存在则创建    

   private void ExistsFile(string FilePath)    

   {    

       if (!File.Exists(FilePath))   

        {   

            FileStream fs = File.Create(FilePath);   

            fs.Close();   

        }   

   }    

posted @ 2013-05-14 16:59  勇仔X  阅读(399)  评论(0编辑  收藏  举报