initial commit for uploading just maps over a VM to OVH
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from pathlib import Path
|
||||
import contextlib
|
||||
import os
|
||||
|
||||
class local_dir_remote:
|
||||
def __init__(self, config):
|
||||
self.config = config
|
||||
self.path = config["path"]
|
||||
|
||||
def list_dir(self):
|
||||
path = Path(self.path)
|
||||
glob_pattern = '*'
|
||||
return list(path.glob(glob_pattern))
|
||||
|
||||
def delete_local_map(self, pathfile):
|
||||
with contextlib.suppress(FileNotFoundError):
|
||||
if str(pathfile).endswith('.bsp'):
|
||||
os.remove(pathfile)
|
||||
Reference in New Issue
Block a user