Create Directory
来源:互联网 发布:知返全文番外txt下载 编辑:程序博客网 时间:2024/05/22 03:07
void CreateDirectory()
{
char* pchEnv = "XXX" ;
char chPathName[MAX_PATH];
if ( 0 == ::GetEnvironmentVariable( pchEnv, chPathName, MAX_PATH ))
{
return;
}
WIN32_FIND_DATA findData;
HANDLE hFind = ::FindFirstFile( chPathName, &findData );
if (( INVALID_HANDLE_VALUE != hFind ) && ( findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ))
{
//
}
else
{
if ( !::CreateDirectory( chPathName, NULL ))
{
::FindClose( hFind );
return;
}
}
::FindClose( hFind );
retuen;
}
/////
void CreateMultiFIle()
{
char* pchEnv = "XXX" ;
char chPathName[MAX_PATH] = { '/0' };
if ( 0 == ::GetEnvironmentVariable( pchEnv, chPathName, MAX_PATH ))
{
return;
}
CString csFilePath = chPathName;
if ( '//' != csFilePath[csFilePath.GetLength() - 1] )
{
csFilePath.Insert( csFilePath.GetLength(), '//' );
}
std::vector<CString> vtPath;
int nPos = 0;
while (( nPos = csFilePath.ReverseFind( '//' )) > 1 )
{
csFilePath = csFilePath.Left( nPos );
vtPath.push_back( csFilePath );
}
for ( int n = vtPath.size() - 2; n >= 0; n-- )
{
WIN32_FIND_DATA findData;
HANDLE hFind = ::FindFirstFile( vtPath[n], &findData );
if (( INVALID_HANDLE_VALUE != hFind ) &&
( findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ))
{
//
}
else
{
if ( !::CreateDirectory( vtPath[n], NULL ))
{
::FindClose( hFind );
return;
}
}
::FindClose( hFind );
// ::CreateDirectory( vtPath[n], NULL );
}
}
- create directory
- Create Directory
- Oracle Create&drop directory
- Hadoop Cannot create directory
- expdp中的create directory
- expdp中的create directory
- 550 create directory operation failed
- UTL_FILE Package的使用方法-CREATE DIRECTORY
- Using Create directory & UTL_FILE in Oracle
- Using Create directory & UTL_FILE in Oracle
- Using Create directory & UTL_FILE in Oracle
- zend studio create project from existing directory
- oracle create or replace directory 的用法
- vsftpd 550 Create directory operation failed 错误
- codeblocks couldn't create the project directory
- Wix create fragment structure for source directory
- Create 8.3 name for an existing directory
- Failed to create the switch conf directory ''.
- ubuntu8.10 新立得包LADM安装配置
- String
- php遍历目录及文件
- 大家好,我有表A中字段content,我现在按content值的前四位进行分组统计,请问,这SQL要怎样写?
- 解决vsftpd:cannot open config file:-l的问题
- Create Directory
- Js中sort()方法的用法
- 数据挖掘
- 面向对象程序员JavaScript指南(2)
- eth_clockgen.v
- C#中linq学习(将泛型集合转换为XML元素)示例
- 第十四章实验14
- Test
- Hibernate对象状态和基本映射类型