19 lines
423 B
Python
19 lines
423 B
Python
import uuid
|
|
from datetime import datetime
|
|
from iottb.definitions import TODAY_DATE_STRING, DEVICE_METADATA_FILE, CAPTURE_METADATA_FILE
|
|
from pathlib import Path
|
|
|
|
|
|
def get_iso_date():
|
|
return datetime.now().strftime('%Y-%m-%d')
|
|
|
|
|
|
def subfolder_exists(parent: Path, child: str):
|
|
return parent.joinpath(child).exists()
|
|
|
|
|
|
def generate_unique_string_with_prefix(prefix: str):
|
|
return prefix + '_' + str(uuid.uuid4())
|
|
|
|
|