![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | open |
def | save |
def | get_valid_name |
def | get_available_name |
def | path |
def | delete |
def | exists |
def | listdir |
def | size |
def | url |
A base storage class, providing some default behaviors that all other storage systems can inherit or override, as necessary.
def google.appengine._internal.django.core.files.storage.Storage.delete | ( | self, | |
name | |||
) |
Deletes the specified file from the storage system.
def google.appengine._internal.django.core.files.storage.Storage.exists | ( | self, | |
name | |||
) |
Returns True if a file referened by the given name already exists in the storage system, or False if the name is available for a new file.
def google.appengine._internal.django.core.files.storage.Storage.get_available_name | ( | self, | |
name | |||
) |
Returns a filename that's free on the target storage system, and available for new content to be written to.
def google.appengine._internal.django.core.files.storage.Storage.get_valid_name | ( | self, | |
name | |||
) |
Returns a filename, based on the provided filename, that's suitable for use in the target storage system.
def google.appengine._internal.django.core.files.storage.Storage.listdir | ( | self, | |
path | |||
) |
Lists the contents of the specified path, returning a 2-tuple of lists; the first item being directories, the second item being files.
def google.appengine._internal.django.core.files.storage.Storage.open | ( | self, | |
name, | |||
mode = 'rb' , |
|||
mixin = None |
|||
) |
Retrieves the specified file from storage, using the optional mixin class to customize what features are available on the File returned.
def google.appengine._internal.django.core.files.storage.Storage.path | ( | self, | |
name | |||
) |
Returns a local filesystem path where the file can be retrieved using Python's built-in open() function. Storage systems that can't be accessed using open() should *not* implement this method.
def google.appengine._internal.django.core.files.storage.Storage.save | ( | self, | |
name, | |||
content | |||
) |
Saves new content to the file specified by name. The content should be a proper File object, ready to be read from the beginning.
def google.appengine._internal.django.core.files.storage.Storage.size | ( | self, | |
name | |||
) |
Returns the total size, in bytes, of the file specified by name.
def google.appengine._internal.django.core.files.storage.Storage.url | ( | self, | |
name | |||
) |
Returns an absolute URL where the file's contents can be accessed directly by a Web browser.