From 25332da4aad1ada04657a04c1601b3dc1cfcdc8f Mon Sep 17 00:00:00 2001 From: Eao3piq4e Date: Tue, 2 Aug 2022 17:01:46 +0800 Subject: [PATCH] Update bbox_lib.cpp --- src/gausskernel/cbb/bbox/bbox_lib.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gausskernel/cbb/bbox/bbox_lib.cpp b/src/gausskernel/cbb/bbox/bbox_lib.cpp index 3db54a483..62873f7f6 100644 --- a/src/gausskernel/cbb/bbox/bbox_lib.cpp +++ b/src/gausskernel/cbb/bbox/bbox_lib.cpp @@ -248,6 +248,18 @@ char* bbox_strstr(const char* s1, const char* s2) /* * make a directory */ +/* +function name: bbox_mkdir +description: We distinguish parent directory and child directory through character '/', + normally through a for loop, we can make sure all directories above the directory + we want to creat exist, finally we will creat the flag directory after its parent. +arguments: A pointers of type const char*, pointing to one strings, which indicates the filename and its full path. +return value: An integer of type s32, if it's RET_ERR, then we fail to make a directory, else if it's RET_OK then we succeed. +note: Take care the last non-null character of the string needed to be '/', and once if flag directory's + ancestors aren't exist, the function return RET_ERR. +date: 2022/8/2 +contact tel: same +*/ s32 bbox_mkdir(const char* pszDir) { char szDirName[BBOX_TMP_LEN_32 * 16];