Swift: List all files in a bucket

Examples

List files in a bucket

let files = try await supabase.storage
  .from("avatars")
  .list(
    path: "folder",
    options: SearchOptions(
      limit: 100,
      offset: 0,
      sortBy: SortBy(column: "name", order: "asc")
    )
  )

Search files in a bucket

let files = try await supabase.storage
  .from("avatars")
  .list(
    path: "folder",
    options: SearchOptions(
      limit: 100,
      offset: 0,
      sortBy: SortBy(column: "name", order: "asc"),
      search: "jon"
    )
  )