http://www.mytaoyuan.com/

解决方案 »

  1.   

    网络硬盘用C#实现很简单的..使用System.IO类,递归一下...类似的代码:=================================================#region
    /// <summary>
    /// 递归读取所有目录
    /// </summary>
    /// <param name="FolderPath"></param>
    private void ShowFolders(string FolderPath )
    {

    string[] Folder = Directory.GetDirectories(FolderPath);
    string Path = Server.MapPath( "user\\disk" );
    string DeFolder = FolderPath.Replace(Path,"");
    if ( DeFolder == "" )
    DeFolder = "根目录";

    FolderList_d.Items.Add( DeFolder );
    //===============End   截取disk文件夹之后的路径名,并加密   ====================

    for ( int i = 0; i < Folder.Length ; i++  ) 
    {
    ShowFolders( Folder[i] );
    }

    }
    #endregion