mode The read/write mode for the file.
close() [source] Close the file. In addition to the listed
chunks(chunk_size=None) [source] Iterate over the file yielding “chunks” of a given size
__iter__() [source] Iterate over the file yielding one line at a time.
read(num_bytes=None) Read content from the file. The optional size is the number of bytes to read; if not specified
name The name of the file including the relative path from MEDIA_ROOT.
class File(file_object) [source] The File class is a thin wrapper around a Python
open(mode=None) [source] Open or reopen the file (which also does File.seek(0))
Page 2 of 2