Skip to content

Commit 4dea527

Browse files
committed
A couple more improvements
1 parent 6d52d17 commit 4dea527

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

adafruit_shell.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,21 @@ def reboot():
142142
"""
143143
os.system("reboot")
144144

145+
@staticmethod
146+
def getcwd():
147+
"""
148+
Get the Current Working Directory
149+
"""
150+
return os.getcwd()
151+
152+
def chdir(self, directory):
153+
"""
154+
Change directory
155+
"""
156+
if directory[0] != "/" and directory[0] != ".":
157+
directory = self.getcwd() + "/" + directory
158+
return os.chdir(directory)
159+
145160
@staticmethod
146161
def is_root():
147162
"""

0 commit comments

Comments
 (0)