mirror of
https://github.com/ARM-software/devlib.git
synced 2025-01-30 17:50:46 +00:00
target: Add Target.makedirs()
Create a directory on the target.
This commit is contained in:
parent
bef1ec3afc
commit
590069f01f
@ -585,6 +585,9 @@ class Target(object):
|
||||
|
||||
# files
|
||||
|
||||
def makedirs(self, path):
|
||||
self.execute('mkdir -p {}'.format(quote(folder)))
|
||||
|
||||
def file_exists(self, filepath):
|
||||
command = 'if [ -e {} ]; then echo 1; else echo 0; fi'
|
||||
output = self.execute(command.format(quote(filepath)), as_root=self.is_rooted)
|
||||
|
@ -436,6 +436,10 @@ Target
|
||||
Return a list of :class:`PsEntry` instances for all running processes on the
|
||||
system.
|
||||
|
||||
.. method:: Target.makedirs(self, path)
|
||||
|
||||
Create a directory at the given path and all its ancestors if needed.
|
||||
|
||||
.. method:: Target.file_exists(self, filepath)
|
||||
|
||||
Returns ``True`` if the specified path exists on the target and ``False``
|
||||
|
Loading…
x
Reference in New Issue
Block a user