2 from http
import HTTPStatus
4 __author__
= "Alfonso Tierno <alfonso.tiernosepulveda@telefonica.com>"
7 class FsException(Exception):
8 def __init__(self
, message
, http_code
=HTTPStatus
.INTERNAL_SERVER_ERROR
):
9 self
.http_code
= http_code
10 Exception.__init
__(self
, "storage exception " + message
)
20 def fs_connect(self
, config
):
23 def fs_disconnect(self
):
26 def mkdir(self
, folder
):
29 def file_exists(self
, storage
):
32 def file_size(self
, storage
):
35 def file_extract(self
, tar_object
, path
):
38 def file_open(self
, storage
, mode
):
41 def file_delete(self
, storage
, ignore_non_exist
=False):