devxlogo

May 4, 2002

GetDirectorySize – Calculate the size of a directory

‘ Returns the size of the specified directory’ – Note: requires Imports System.IO’ – Usage: Dim DirSize As Long = GetDirectorySize(“D:Projects”)Function GetDirectorySize(ByVal DirPath As String) As Long Dim DirSize As

CopyDirectory – Copy a directory

‘ Copies a source directory to the destination directory.’ The last parameter specifies whether the files already present in the’ destination directory will be overwritten’ – Note: requires Imports System.IO’

LoadTextFile – Load the contents of a text file

‘ Returns the content of the specified text file’ Note: it can throw an exception’ Usage: Dim FileContent As String = LoadTextFile(“C:Autoexec.bat”)Function LoadTextFile(ByVal FilePath As String) As String Dim sr