gpt4 book ai didi

javascript - 为 DriveApp getFilesByType 指定顺序

转载 作者:行者123 更新时间:2023-11-30 05:47:57 29 4
gpt4 key购买 nike

当我使用 DriveApp getFilesByType 时,它​​会为我提供大量文件。

我想知道如果我多次调用它,结果是否总是以相同的顺序返回?或者是否有办法指定顺序?

或者我应该检索所有文档然后在 AppsScript 中对它们进行排序吗?

最佳答案

无法控制 Apps 脚本中返回的顺序,我们也不保证顺序明确或稳定。如果您希望对它们进行排序,则必须在检索它们后在 Apps 脚本代码中执行此操作。

关于javascript - 为 DriveApp getFilesByType 指定顺序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16738358/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com