Source code for rsmxo.Implementations.MassMemory.Ndrive.Npath

from ....Internal.Core import Core
from ....Internal.CommandsGroup import CommandsGroup
from ....Internal import Conversions
from ....Internal.Utilities import trim_str_response
from .... import repcap


# noinspection PyPep8Naming,PyAttributeOutsideInit,SpellCheckingInspection
class NpathCls:
	"""
	| Commands in total: 1
	| Subgroups: 0
	| Direct child commands: 1
	"""

	def __init__(self, core: Core, parent):
		self._core = core
		self._cmd_group = CommandsGroup("npath", core, parent)

[docs] def set(self, file_path: str, ndrive=repcap.Ndrive.Default) -> None: """ ``MMEMory:NDRive<*>:NPATh`` \n Snippet: ``driver.massMemory.ndrive.npath.set(file_path = 'abc', ndrive = repcap.Ndrive.Default)`` \n Sets the network folder that is mapped to the local folder. :param file_path: String with the full path in UNC syntax, for example, //net1/data/team1/osc. :param ndrive: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ndrive') """ param = Conversions.value_to_quoted_str(file_path) ndrive_cmd_val = self._cmd_group.get_repcap_cmd_value(ndrive, repcap.Ndrive) self._core.io.write(f'MMEMory:NDRive{ndrive_cmd_val}:NPATh {param}')
[docs] def get(self, ndrive=repcap.Ndrive.Default) -> str: """ ``MMEMory:NDRive<*>:NPATh`` \n Snippet: ``value: str = driver.massMemory.ndrive.npath.get(ndrive = repcap.Ndrive.Default)`` \n Sets the network folder that is mapped to the local folder. :param ndrive: optional repeated capability selector. Default value: Nr1 (settable in the interface 'Ndrive') :return: file_path: String with the full path in UNC syntax, for example, //net1/data/team1/osc. """ ndrive_cmd_val = self._cmd_group.get_repcap_cmd_value(ndrive, repcap.Ndrive) response = self._core.io.query_str(f'MMEMory:NDRive{ndrive_cmd_val}:NPATh?') return trim_str_response(response)