Class FolderIterator
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
FolderIterator
Komut dosyalarının, büyük bir klasör koleksiyonunda yineleme yapmasına olanak tanıyan bir nesne. Klasör
yineleyicilere DriveApp, File veya Folder üzerinden erişilebilir.
// Log the name of every folder in the user's Drive.constfolders=DriveApp.getFolders();while(folders.hasNext()){constfolder=folders.next();Logger.log(folder.getName());}
Dosya veya klasör koleksiyonundaki bir sonraki öğeyi alır.
Ayrıntılı belgeler
getContinuationToken()
Bu yinelemeye daha sonra devam etmek için kullanılabilecek bir jeton alır. Bu yöntem, bir yineleyiciyi tek bir yürütmede işleme almanın maksimum yürütme süresini aşması durumunda kullanışlıdır. Devamlılık jetonları genellikle bir hafta boyunca geçerlidir.
Return
String: Bu yinelemeyi, jeton oluşturulduğunda yineleyicide kalan öğelerle devam ettirmek için kullanılabilen bir devamlılık jetonu.
hasNext()
next() işlevinin çağrılmasının bir öğe döndürüp döndürmeyeceğini belirler.
Return
Boolean — next() bir öğe döndürürse true, döndürmezse false.
next()
Dosya veya klasör koleksiyonundaki bir sonraki öğeyi alır. Öğe kalmazsa istisna oluşturur.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2026-03-06 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"]]