判断路径下是否为空、判断是否存在该路径

判断路径下是否为空

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

判断是否存在该路径

if (Directory.Exists(VideoUrl))
                        {
                          
                        } 
原文地址:https://www.cnblogs.com/macT/p/12014934.html