class documentation

class File(FileProxyMixin):

Known subclasses: django.core.files.base.ContentFile, django.core.files.images.ImageFile

View In Hierarchy

Undocumented

Method __iter__ Undocumented
Method chunks Read the file and yield chunks of chunk_size bytes (defaults to File.DEFAULT_CHUNK_SIZE).
Method close Undocumented
Method multiple​_chunks Return True if you can expect multiple chunks.
Method open Undocumented
Constant DEFAULT​_CHUNK​_SIZE Undocumented
Instance Variable file Undocumented
Instance Variable mode Undocumented
Instance Variable name Undocumented
Method __bool__ Undocumented
Method __enter__ Undocumented
Method __exit__ Undocumented
Method __init__ Undocumented
Method __len__ Undocumented
Method __repr__ Undocumented
Method __str__ Undocumented
Property size Undocumented

Inherited from FileProxyMixin:

Method readable Undocumented
Method seekable Undocumented
Method writable Undocumented
Class Variable encoding Undocumented
Class Variable fileno Undocumented
Class Variable flush Undocumented
Class Variable isatty Undocumented
Class Variable newlines Undocumented
Class Variable read Undocumented
Class Variable readinto Undocumented
Class Variable readline Undocumented
Class Variable readlines Undocumented
Class Variable seek Undocumented
Class Variable tell Undocumented
Class Variable truncate Undocumented
Class Variable write Undocumented
Class Variable writelines Undocumented
Property closed Undocumented
def __iter__(self):
def chunks(self, chunk_size=None):
Read the file and yield chunks of chunk_size bytes (defaults to File.DEFAULT_CHUNK_SIZE).
def close(self):

Undocumented

def multiple_chunks(self, chunk_size=None):

Return True if you can expect multiple chunks.

NB: If a particular file representation is in memory, subclasses should always return False -- there's no good reason to read from memory in chunks.

def open(self, mode=None):

Undocumented

DEFAULT_CHUNK_SIZE =

Undocumented

Value
64*2**10
file =

Undocumented

mode =

Undocumented

name =

Undocumented

def __bool__(self):

Undocumented

def __enter__(self):

Undocumented

def __exit__(self, exc_type, exc_value, tb):

Undocumented

def __init__(self, file, name=None):

Undocumented

def __len__(self):

Undocumented

def __repr__(self):

Undocumented

def __str__(self):

Undocumented

@cached_property
size =

Undocumented