INNER CODE UNIT · Python
get_file_iterator
GraiaProject/Ariadne · src/graia/ariadne/app.py:386
async def get_file_iterator(
self,
target: Union[Group, int],
id: str = "",
offset: int = 0,
size: int = 1,
with_download_info: bool = False,
) -> AsyncGenerator[FileInfo, None]:
"""
以生成器形式列出指定文件夹下的所有文件.
Args:
target (Union[Group, int]): 要列出文件的根位置, \
为群组或群号 (当前仅支持群组)
id (str): 文件夹ID, 空串为根目录
offset (int): 起始分页偏移
size (int): 单次分页大小
with_download_info (bool): 是否携带下载信息, 无必要不要携带