listFiles
This function allows for listing files on Google Drive with an optional query to filter the files.
Return
A Flow of GoogleDriveFile
. Each GoogleDriveFile
is a file that matches the specified query on Google Drive.
Example usage:
val serviceAccount: JsonNode = // provide your credentials here
val googleDriveApi = GoogleDriveApi(serviceAccount)
val filesFlow: Flow<GoogleDriveFile> = googleDriveApi.listFiles {
driveId = "x"
}
filesFlow.collect { file ->
println(file.name)
}
Content copied to clipboard
Parameters
query
A lambda with receiver on FilesListQuery
. Allows to construct a query for filtering files. Default value is an empty lambda.