C# 判断文件夹是否为空

C# 判断文件夹是否为空

         //pbak是要检查是否为空的文件夹路径
        if (Directory.GetDirectories(pbak).Length > 0 || Directory.GetFiles(pbak).Length > 0)
        {
            Response.Write("<script>alert('文件夹不为空!');</script>");
        }
posted @ 2012-03-19 10:13  晴天有时下鱼  阅读(1577)  评论(0编辑  收藏  举报