recursive.h

来自「实时监控」· C头文件 代码 · 共 26 行

H
26
字号
#ifndef _RECURSIVE_H
#define _RECURSIVE_H

extern "C" static VOID WINAPI recursive_create_dir(LPCTSTR dir)
{
	CString str(dir);
	CString path;
	int idx = 0;
	
	while(1)
	{
		idx = str.Find('\\');
		if( idx == -1 )
			break;
		
		path += str.Left(idx);
		if( path.Right(1) != _T(":") )	// like C:
		{
			CreateDirectory(path, NULL);
		}
		path += _T("\\");
		str.Delete(0, idx+1);
	}
}

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?