getDirectory

“getDirectory” is part of my PortfolioService in AMFPHP. It gets the files in a directory and provides info about them such as the name, size, and extension. This information can be read by Flash via Flash Remoting and is received as an array of objects which is binary compressed.

It’s real usefulness is for media viewers (images, sound, video). Once you build a player that uses this service, you can update new songs, videos, etc by simply uploading them to the same folder, and the media is automatically available to the application using the service.

To see live data similar to image above:

  1. go to http://as3.actionscriptdude.com/amfphp/browser/
  2. Click on PortfolioService
  3. click on getDirectory
  4. for the dir_ parameter, type in mp3
  5. click on Submit Query
  6. You should see a list of objects containing information about each mp3 file


The “mp3” query is used by the MP3 player example.

Leave a Reply

Your email address will not be published. Required fields are marked *