Get the content of an Apache Directory Index
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
apachetree.jquery.json
jquery.apachetree.js

README.md

jquery.apachetree

Get the content of an Apache Directory Index

Usage

 $.getApacheTree('yourbrowseabledirectory/').done(
   function(data){
     // Do something with data
   }
 );

Returns something like :

[
  {
    file: "afile.txt",
    href: "yourbrowseabledirectory/afile.txt"
  },
  {
    file: "anotherfile.txt",
    href: "yourbrowseabledirectory/anotherfile.txt"
  },
  {
    file: "subdirectory/",
    href: "yourbrowseabledirectory/subdirectory/"
    nodes: [
      {
        file: "lorem.csv",
        href: "yourbrowseabledirectory/subdirectory/lorem.csv"
      },
      {
        file: "ipsum.png",
        href: "yourbrowseabledirectory/subdirectory/ipsum.png"
      }
    ]
  }
]