(Visual Basic 6.0) Demonstrate Directory Path Functions
Demonstrates the path functions GetDirectoryName, GetExtension, GetFileName, and GetFileNameWithoutExtension.
Dim fac As New CkFileAccess
' Note: Chilkat accepts either forward slash or backslash chars as directory separators..
Debug.Print fac.GetDirectoryName("/MyDir/MySubDir/myfile.ext")
Debug.Print fac.GetDirectoryName("/MyDir/MySubDir")
Debug.Print fac.GetDirectoryName("/MyDir/")
Debug.Print fac.GetDirectoryName("/MyDir")
Debug.Print fac.GetDirectoryName("/")
Debug.Print fac.GetExtension("C:/mydir.old/myfile.ext")
Debug.Print fac.GetExtension("C:/mydir.old/")
Debug.Print fac.GetFileName("C:/mydir/myfile.ext")
Debug.Print fac.GetFileName("C:/mydir/")
Debug.Print fac.GetFileNameWithoutExtension("C:/mydir/myfile.ext")
Debug.Print fac.GetFileNameWithoutExtension("C:/mydir/")
Debug.Print "---"
|