diff --git a/source/diff.py b/source/diff.py index 91d5822..8bcf05a 100644 --- a/source/diff.py +++ b/source/diff.py @@ -2752,18 +2752,6 @@ def _set_column_model(columns): return column_model -def _set_image_url(image, id_extension=''): - if exists_path(image): - return _path_url(image) - - if not id_extension: - return '' - - path = get_path_extension(id_extension) - path = join(path, DIR['images'], image) - return _path_url(path) - - class LODialog(object): def __init__(self, **properties): @@ -3287,26 +3275,6 @@ def get_dir(init_dir=''): return path -# ~ Export ok -def json_dumps(data): - return json.dumps(data, indent=4, sort_keys=True) - - -# ~ Export ok -def json_loads(data): - return json.loads(data) - - -# ~ Export ok -def get_file_size(path): - return Path(path).stat().st_size - - -# ~ Export ok -def is_created(path): - return is_file(path) and bool(get_file_size(path)) - - # ~ Export ok def zip_content(path): with zipfile.ZipFile(path) as z: diff --git a/source/easymacro2.py b/source/easymacro2.py index e59ea86..7c10dca 100644 --- a/source/easymacro2.py +++ b/source/easymacro2.py @@ -3694,6 +3694,10 @@ class Paths(object): def url(self): return self._path.as_uri() + @property + def size(self): + return self._path.stat().st_size + @classproperty def home(self): return str(Path.home())