#[FileUtils]: Utilities for interfacing with files and directories
#===================================================================================================
#Imports
import os

#CONTEXT MANAGEMENT --------------------------------------------------------------------------------
class cd:
	def __init__(self, new_path):
		self.new_path = os.path.expanduser(new_path)
		
	def __enter__(self):
		self.saved_path = os.getcwd()
		os.chdir(self.new_path)
		
	def __exit__(self, etype, value, traceback):
		os.chdir(self.saved_path)

#FILE MANAGEMENT -----------------------------------------------------------------------------------
