|
한재혁 님이 쓰신 글 :
: 폴더를 생성하는 소스가 어떻게 됩니까?
VCL의 CreateDir() 함수를 사용하거나, Parents가 필요한 거라면 ForceDirectories() 로 만듭니다.
#include <Filectrl.hpp>
void __fastcall TForm1::Button1Click(TObject *Sender)
{
if (!DirectoryExists("c:\\temp"))
{
if (!CreateDir("C:\\temp"))
throw Exception("Cannot create c:\\temp directory.");
}
}
//------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
AnsiString Dir = "C:\Apps\Sales\Local";
if (ForceDirectories(Dir))
Label1->Caption = Dir + " was created";
}
|