29 #include "nsISupports.idl"
46 [scriptable,
uuid(508bc51e-001f-4f3e-b036-d7dbff91e8dd)]
105 #define SB_DIRECTORYENUMERATOR_CONTRACTID \
106 "@songbirdnest.com/Songbird/DirectoryEnumerator;1"
108 #include <nsAutoPtr.h>
109 #include <nsComponentManagerUtils.h>
118 NS_ENSURE_SUCCESS(rv, rv);
120 rv = dirEntries->SetFilesOnly(PR_FALSE);
121 NS_ENSURE_SUCCESS(rv, rv);
122 rv = dirEntries->SetMaxDepth(1);
123 NS_ENSURE_SUCCESS(rv, rv);
124 rv = dirEntries->Enumerate(aFile);
125 NS_ENSURE_SUCCESS(rv, rv);
127 dirEntries.forget(aDirEntryEnumerator);
nsIFile getNext()
Return the next file in the enumeration.
attribute unsigned long maxDepth
Maximum depth to which to enumerate. A depth of 0 will enumerate to an unlimited depth. A depth of 1 will enumerate only the base directory (same as getDirectoryEntries).
nsresult sbGetDirectoryEntries(nsIFile *aFile, sbIDirectoryEnumerator **aDirEntryEnumerator)
#define SB_DIRECTORYENUMERATOR_CONTRACTID
attribute boolean filesOnly
If true, only return files in getNext.
attribute boolean directoriesOnly
If true, only return directories in getNext.
boolean hasMoreElements()
Return true if more elements are available to enumerate.
void enumerate(in nsIFile aDirectory)
Enumerate the directory specified by aDirectory.