# Stubs for django.core.files.base (Python 3.5)

from typing import Any, Iterable, Iterator, Optional, Sized, Union
from django.core.files.utils import FileProxyMixin

class File(FileProxyMixin, Sized, Iterable[bytes]):
    DEFAULT_CHUNK_SIZE = ...  # type: int
    file = ...  # type: Any
    name: Optional[str] = ...  # type: ignore
    mode = ...  # type: str
    size = ... # type: int

    def __init__(self, file: Any, name: str=None) -> None: ...
    @property
    def closed(self) -> bool: ...
    def chunks(self, chunk_size: int=None) -> Iterator[bytes]: ...
    def multiple_chunks(self, chunk_size: int=None) -> bool: ...
    def __enter__(self) -> 'File': ...
    def __exit__(self, t: type = None, value: BaseException = None, traceback: Any = None) -> bool: ...
    def open(self, mode: str=None) -> None: ...
    def close(self) -> None: ...

class ContentFile(File):
    def __init__(self, content: Union[str, bytes], name: Optional[str]=None) -> None: ...

def endswith_cr(line: Union[str, bytes]) -> bool: ...
def endswith_lf(line: Union[str, bytes]) -> bool: ...
def equals_lf(line: Union[str, bytes]) -> bool: ...
