Check this out!!! http://superdit.com/2011/06/01/extjs-simple-file-browser/
ExtJS: Simple File Browser
June 1st, 2011 by Aditia Rahman
ExtJS has a lot of great components to build complete web application that can be look like desktop application, In today post I want to show how to create a very simple file browser in ExtJS, with PHP backend we can easily get file and folder on the system.
First this example have some limitation, I try it on my XAMPP localhost, so I assumed the it is the top parent of all directories, the tree directory only load once when the page is loaded, file preview only in grid component.
The example container is based on window component, which have two items inside, they are treePanel and gridPanel, the gridPanel will load dynamically, trigerred when user click on of the tree node.
This file is for fetching all directory on your XAMPP htdocs directory, using $_SERVER[‘DOCUMENT_ROOT’]
variable. If you have many directory on htdocs, it will take time to load. In this php file I used a recursive function to get all the directory with all the sub directory by one call function, that’s why it will take time to load, and create a json format from it.
And this is the last file to get all the file (without any directory) in specific directory, the parameter sent from ExtJS tree node, when it clicked.
Well that all hope can give some idea to create much larger application or adding some more feature like icons view (using DataView component), create, edit, delete file, etc.