1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpcom/io/nsIDirectoryEnumerator.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "nsISupports.idl" 1.10 + 1.11 +interface nsIFile; 1.12 + 1.13 +/** 1.14 + * This interface provides a means for enumerating the contents of a directory. 1.15 + * It is similar to nsISimpleEnumerator except the retrieved entries are QI'ed 1.16 + * to nsIFile, and there is a mechanism for closing the directory when the 1.17 + * enumeration is complete. 1.18 + */ 1.19 +[scriptable, uuid(31f7f4ae-6916-4f2d-a81e-926a4e3022ee)] 1.20 +interface nsIDirectoryEnumerator : nsISupports 1.21 +{ 1.22 + /** 1.23 + * Retrieves the next file in the sequence. The "nextFile" element is the 1.24 + * first element upon the first call. This attribute is null if there is no 1.25 + * next element. 1.26 + */ 1.27 + readonly attribute nsIFile nextFile; 1.28 + 1.29 + /** 1.30 + * Closes the directory being enumerated, releasing the system resource. 1.31 + * @throws NS_OK if the call succeeded and the directory was closed. 1.32 + * NS_ERROR_FAILURE if the directory close failed. 1.33 + * It is safe to call this function many times. 1.34 + */ 1.35 + void close(); 1.36 +}; 1.37 +