File Explorer Not Seeing Virtual Directories

3 posts, 0 answers
  1. Mike
    Mike avatar
    11 posts
    Member since:
    Sep 2012

    Posted 18 Aug 2010 Link to this post

    Typically I use virtual directories in my websites,  so that when I publish a new version,  the directories the client works in,  do not get overwritten.

    In using the File Explorer control,  I can not seem to get the control to see the virtual directories.

    I could have sworn I have used server.mappath() on virtual directories before,  but rad file explorer doesnt return the directories or files.

    Am I missing something? 

    I will do a test on server.mappath to make sure im not crazy, which is entirely possible.  But I thought I would put the question out there to see if anyone can shine some light on it,  while I perform some tests.

    Thanks,
    M2
  2. Mike
    Mike avatar
    11 posts
    Member since:
    Sep 2012

    Posted 18 Aug 2010 Link to this post

    I checked,  and the virtual directories do indeed come back with an absolute path when I do server.mappath on the virtual directory within the direcotry I have in configuration : deletePaths, uploadpaths, ViewPaths, InitialPath.

    Does the file explorer control use some other method for finding the sub folders than server.mappath?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fiko
    Admin
    Fiko avatar
    1406 posts

    Posted 23 Aug 2010 Link to this post

    Hi Mike,

    Basically the default RadFileExplorer's content provider uses the GetFiles and GetDirectories methods of the System.IO.DirectoryInfo class in order to get the directories/files. If these methods returns the files/folders, then RadFileExplorer should work. as well. You can test the methods by using this test code:

    protected void Page_Load(object sender, EventArgs e)
    {
        string physicalPathToFolder = Server.MapPath("VirtualPathToFolder");
        System.IO.DirectoryInfo dirInfo = new System.IO.DirectoryInfo(physicalPathToFolder);
        System.IO.FileInfo[] files = dirInfo.GetFiles("*.*");
        System.IO.DirectoryInfo[] directories = dirInfo.GetDirectories();
    }



    All the best,
    Fiko
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top