diff options
| author | EverythingWindows <[email protected]> | 2022-11-17 11:11:51 +0700 |
|---|---|---|
| committer | EverythingWindows <[email protected]> | 2022-11-17 11:11:51 +0700 |
| commit | f9c724e547a659671174d264ba74603ac8227b6e (patch) | |
| tree | 88cd2fc58de670ec931c9be81ca01f7adf7927a3 /ShiftOS-TheRevival/TerminalApplications/Internal/Com_Cd.vb | |
| parent | b6ad60f56854bdf720c1e7177f011329048516db (diff) | |
| download | shiftos-therevival-old-f9c724e547a659671174d264ba74603ac8227b6e.tar.gz shiftos-therevival-old-f9c724e547a659671174d264ba74603ac8227b6e.tar.bz2 shiftos-therevival-old-f9c724e547a659671174d264ba74603ac8227b6e.zip | |
moving from DirectoryManagement to each modules for DE's other module for said action.
Diffstat (limited to 'ShiftOS-TheRevival/TerminalApplications/Internal/Com_Cd.vb')
| -rw-r--r-- | ShiftOS-TheRevival/TerminalApplications/Internal/Com_Cd.vb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Cd.vb b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Cd.vb new file mode 100644 index 0000000..479d050 --- /dev/null +++ b/ShiftOS-TheRevival/TerminalApplications/Internal/Com_Cd.vb @@ -0,0 +1,19 @@ +Module Com_Cd + Public Sub NavigateDir(TheDirectory As String) + If TheDirectory = ".." Then + If Console.CurrentDirectory = Strings.OnceInfo(1) Then + NewLine("!\") + Else + Console.CurrentDirectory = IO.Directory.GetParent(Console.CurrentDirectory).ToString + End If + Else + If IO.Directory.Exists(Console.CurrentDirectory + "\" + TheDirectory) Then + Console.CurrentDirectory = Console.CurrentDirectory & "\" & TheDirectory + ElseIf IO.Directory.Exists(TheDirectory) Then + Console.CurrentDirectory = TheDirectory + Else + NewLine("The directory is not exist!") + End If + End If + End Sub +End Module |
