ZhiYeJianKang_PeiXun/Song.Site/Manage/Utility/UploadPath/FileExplorer.aspx.cs
2025-02-20 15:41:53 +08:00

34 lines
1.1 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Song.Site.Manage.Utility.UploadPath
{
/// <summary>
/// 文件资源管理
/// </summary>
public partial class FileExplorer : Extend.CustomPage
{
//上传文件的配置项参照web.config中的Platform/Upload节点
string pathkey = WeiSha.Common.Request.QueryString["path"].String;
protected void Page_Load(object sender, EventArgs e)
{
//当前文件夹
ltCuurentPath.Text = WeiSha.Common.Upload.Get[pathkey].Virtual;
//物理路径
string path = WeiSha.Common.Upload.Get[pathkey].Physics;
System.IO.DirectoryInfo dir = new System.IO.DirectoryInfo(path);
//下级文件夹
System.IO.DirectoryInfo[] dirs = dir.GetDirectories();
rptDirs.DataSource = dirs;
rptDirs.DataBind();
//下级文件
System.IO.FileInfo[] files = dir.GetFiles();
rptFiles.DataSource = files;
rptFiles.DataBind();
}
}
}