संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
FolderIterator
एक ऐसा ऑब्जेक्ट जिसकी मदद से, स्क्रिप्ट फ़ोल्डर के बड़े कलेक्शन पर बार-बार काम कर सकती हैं. फ़ोल्डर के लिए, DriveApp, File या Folder से फ़ाइलों को ऐक्सेस किया जा सकता है.
// Log the name of every folder in the user's Drive.constfolders=DriveApp.getFolders();while(folders.hasNext()){constfolder=folders.next();Logger.log(folder.getName());}
फ़ाइलों या फ़ोल्डर के कलेक्शन में अगला आइटम दिखाता है.
ज़्यादा जानकारी वाला दस्तावेज़
getContinuationToken()
एक टोकन मिलता है, जिसका इस्तेमाल बाद में इस प्रोसेस को फिर से शुरू करने के लिए किया जा सकता है. यह तरीका तब काम आता है, जब एक बार में किसी इटरेटटर को प्रोसेस करने में, प्रोसेस करने के लिए तय किया गया ज़्यादा से ज़्यादा समय खत्म हो जाता है.
आम तौर पर, कंटिन्यूएशन टोकन एक हफ़्ते के लिए मान्य होते हैं.
वापसी का टिकट
String — यह एक ऐसा टोकन है जिसका इस्तेमाल, टोकन जनरेट होने के बाद, उन आइटम के साथ इस दोहराव को फिर से शुरू करने के लिए किया जा सकता है जो इटरेटर में बचे थे
hasNext()
यह तय करता है कि next() को कॉल करने पर, कोई आइटम वापस मिलेगा या नहीं.
वापसी का टिकट
Boolean — true, अगर next() कोई आइटम लौटाएगा; false, अगर नहीं
next()
फ़ाइलों या फ़ोल्डर के कलेक्शन में अगला आइटम दिखाता है. अगर कोई आइटम नहीं है, तो अपवाद दिखाता है.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-26 (UTC) को अपडेट किया गया."],[],["FolderIterator allows iterating over a large collection of folders. Key actions include using `hasNext()` to check for the next item and `next()` to retrieve it. `getContinuationToken()` provides a token to resume iteration later, helpful for large collections. The example shows how to log every folder's name in a user's Drive, demonstrating iteration through the folder collection. The iterator returns folder objects and can throw an exception if no items remain.\n"]]