import os

from blobfile._common import ConcurrentWriteFailure as ConcurrentWriteFailure
from blobfile._common import DeadlineExceeded as DeadlineExceeded
from blobfile._common import DirEntry as DirEntry
from blobfile._common import Error as Error
from blobfile._common import Request as Request
from blobfile._common import RequestFailure as RequestFailure
from blobfile._common import RestartableStreamingWriteFailure as RestartableStreamingWriteFailure
from blobfile._common import Stat as Stat
from blobfile._common import VersionMismatch as VersionMismatch
from blobfile._context import Context as Context
from blobfile._context import create_context as create_context
from blobfile._ops import BlobFile as BlobFile
from blobfile._ops import basename as basename
from blobfile._ops import configure as configure
from blobfile._ops import copy as copy
from blobfile._ops import dirname as dirname
from blobfile._ops import exists as exists
from blobfile._ops import get_url as get_url
from blobfile._ops import glob as glob
from blobfile._ops import isdir as isdir
from blobfile._ops import join as join
from blobfile._ops import last_version_seen as last_version_seen
from blobfile._ops import listdir as listdir
from blobfile._ops import makedirs as makedirs
from blobfile._ops import md5 as md5
from blobfile._ops import read_bytes as read_bytes
from blobfile._ops import read_text as read_text
from blobfile._ops import remove as remove
from blobfile._ops import rmdir as rmdir
from blobfile._ops import rmtree as rmtree
from blobfile._ops import scandir as scandir
from blobfile._ops import scanglob as scanglob
from blobfile._ops import set_mtime as set_mtime
from blobfile._ops import stat as stat
from blobfile._ops import walk as walk
from blobfile._ops import write_bytes as write_bytes
from blobfile._ops import write_text as write_text

_SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
with open(os.path.join(_SCRIPT_DIR, "VERSION")) as _version_file:
    __version__ = _version_file.read().strip()

__all__ = [
    "copy",
    "exists",
    "glob",
    "scanglob",
    "isdir",
    "listdir",
    "scandir",
    "makedirs",
    "remove",
    "rmdir",
    "rmtree",
    "stat",
    "walk",
    "basename",
    "dirname",
    "join",
    "get_url",
    "md5",
    "set_mtime",
    "configure",
    "BlobFile",
    "Request",
    "Error",
    "RequestFailure",
    "RestartableStreamingWriteFailure",
    "ConcurrentWriteFailure",
    "DeadlineExceeded",
    "Stat",
    "DirEntry",
    "Context",
    "create_context",
    "VersionMismatch",
]
