判断路径下是否为空

if (Directory.GetDirectories(path).Length > 0 || Directory.GetFiles(path).Length > 0)
            {
                //
            }
            else
            {
              //
            }

判断是否存在该路径

if (Directory.Exists(VideoUrl))
                        {
                          
                        } 

 

posted on 2019-12-10 09:58  红磨坊后的白桦树  阅读(436)  评论(0编辑  收藏  举报