from ...Internal.Core import Core
from ...Internal.CommandsGroup import CommandsGroup
from ...Internal import Conversions
from ...Internal.Utilities import trim_str_response
# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class MakeDirectoryCls:
"""
| Commands in total: 1
| Subgroups: 0
| Direct child commands: 1
"""
def __init__(self, core: Core, parent):
self._core = core
self._cmd_group = CommandsGroup("makeDirectory", core, parent)
[docs]
def set(self, directory: str) -> None:
"""
``MMEMory:MDIRectory`` \n
Snippet: ``driver.massMemory.makeDirectory.set(directory = 'abc')`` \n
This command creates a new directory.
:param directory: String containing the path and new directory name The path may be relative or absolute.
"""
param = Conversions.value_to_quoted_str(directory)
self._core.io.write(f'MMEMory:MDIRectory {param}')
[docs]
def get(self) -> str:
"""
``MMEMory:MDIRectory`` \n
Snippet: ``value: str = driver.massMemory.makeDirectory.get()`` \n
This command creates a new directory.
:return: directory: String containing the path and new directory name The path may be relative or absolute.
"""
response = self._core.io.query_str(f'MMEMory:MDIRectory?')
return trim_str_response(response)