File_MkPath()

… visits
Parent Previous Next

Syntax

File_MkPath(ByRef PathString As Dword), Byte

Parameters

Parameter

Description

PathString

source string buffer array — a string variable is required here, since ByRef passes its address automatically

Return value

0 if all OK

Overview

             1 if a directory couldn't be created


Creates every directory in PathString and set as active


Creates every directory in PathString that doesn't already exist, and ends with the current directory set to the deepest level - "mkdir -p" style. 


PathString may be absolute "/LOGS/2026/07" or relative "2026/07", created inside whatever's current.

Example

Dim sTemp As String * 20        'Create string array variable

sTemp = "/Log/2026/New"         'Place some path in this string variable

File_MkPath(sTemp)              'Create all sub-folders and set the last as active

Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator