This module allows you to share items and to import files.
shareItems()
Opens a share sheet with given items.
FilePicker
(Wraps PyFilePicker)
A class representing a file picker.
Example:
filePicker = sharing.FilePicker.new()
filePicker.fileTypes = ["public.data"]
filePicker.allowsMultipleSelection = True
def filesPicked() -> None:
files = sharing.pickedFiles()
sharing.shareItems(files)
filePicker.completion = filesPicked
sharing.pickDocumentsWithFilePicker(filePicker)
pickDocumentsWithFilePicker(filePicker)
Pick documents with given parameters as a FilePicker
.
pickedFiles()
Returns files picked with pickDocumentsWithFilePicker
as URLs.
openURL(url)
Opens the given URL.
NSURL
.