diff options
| author | EverythingWindows <[email protected]> | 2022-11-07 07:13:50 +0700 |
|---|---|---|
| committer | EverythingWindows <[email protected]> | 2022-11-07 07:13:50 +0700 |
| commit | 78525e6c04152957c5862ace155b90a9ac060002 (patch) | |
| tree | 6d4ec1b222eb866295c0c90bff52785a1d2175c3 /ShiftOS-TheRevival/MainForms/FileManagement.vb | |
| parent | e17103c363ce30c2baa6f3795177a4eeae1e535a (diff) | |
| download | shiftos-therevival-old-78525e6c04152957c5862ace155b90a9ac060002.tar.gz shiftos-therevival-old-78525e6c04152957c5862ace155b90a9ac060002.tar.bz2 shiftos-therevival-old-78525e6c04152957c5862ace155b90a9ac060002.zip | |
0.2.4 started
Diffstat (limited to 'ShiftOS-TheRevival/MainForms/FileManagement.vb')
| -rw-r--r-- | ShiftOS-TheRevival/MainForms/FileManagement.vb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ShiftOS-TheRevival/MainForms/FileManagement.vb b/ShiftOS-TheRevival/MainForms/FileManagement.vb index b943fba..b4f6757 100644 --- a/ShiftOS-TheRevival/MainForms/FileManagement.vb +++ b/ShiftOS-TheRevival/MainForms/FileManagement.vb @@ -3,8 +3,18 @@ Module FileManagement Public Sub CatFile(filename As String) If File.Exists(Terminal.CurrentDirectory & "\" & filename) = True Then - Dim Contents As String = File.ReadAllText(Terminal.CurrentDirectory & "\" & filename) - Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & Contents + Try + Dim Contents As Byte() = File.ReadAllBytes(Terminal.CurrentDirectory & "\" & filename) + Dim ContentsFinal As String = Convert.ToString(Contents) + Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & ContentsFinal + Catch ex As Exception + Try + Dim ContentsFinal As String() = File.ReadAllLines(Terminal.CurrentDirectory & "\" & filename) + Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & ContentsFinal + Catch ex As Exception + + End Try + End Try End If End Sub End Module |
