“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:
- go to http://as3.actionscriptdude.com/amfphp/browser/
- Click on PortfolioService
- click on getDirectory
- for the dir_ parameter, type in mp3
- click on Submit Query
- You should see a list of objects containing information about each mp3 file
The “mp3” query is used by the MP3 player example.