Advertisement
naspenang

test

Jun 30th, 2023
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VisualBasic 0.43 KB | Source Code | 0 0
  1. Imports System.IO
  2.  
  3.  
  4. Namespace MyCode
  5.  
  6.     Public Class TextWriter
  7.  
  8.         Public Shared Sub Write(StrToWrite As String, FileAbsolutePath As String)
  9.  
  10.             Dim DirPath As String = Path.GetDirectoryName(FileAbsolutePath)
  11.             If Not Directory.Exists(DirPath) Then Directory.CreateDirectory(DirPath)
  12.  
  13.             File.WriteAllText(FileAbsolutePath, StrToWrite)
  14.         End Sub
  15.  
  16.     End Class
  17.  
  18. End Namespace
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement