X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Fcommon.git;a=blobdiff_plain;f=osm_common%2Ffslocal.py;h=3686b364c5844343e1b99747f06ce0d5376a7954;hp=7794754f966e96c03e288bd0c98896a0e8addd12;hb=f296d2a468e38fef4145f526b5bc0726502d77cf;hpb=788b9d66ded6d5b8a5fe13befdcdf1aede6bbfc0 diff --git a/osm_common/fslocal.py b/osm_common/fslocal.py index 7794754..3686b36 100644 --- a/osm_common/fslocal.py +++ b/osm_common/fslocal.py @@ -93,6 +93,8 @@ class FsLocal(FsBase): else: f = "/".join(storage) if os.path.exists(self.path + f): + if not mode: + return True if mode == "file" and os.path.isfile(self.path + f): return True if mode == "dir" and os.path.isdir(self.path + f): @@ -178,5 +180,8 @@ class FsLocal(FsBase): except (IOError, PermissionError) as e: raise FsException("File {} cannot be deleted: {}".format(f, e), http_code=HTTPStatus.INTERNAL_SERVER_ERROR) - def sync(self): + def sync(self, from_path=None): + pass # Not needed in fslocal + + def reverse_sync(self, from_path): pass # Not needed in fslocal