아래 코딩에서 raise 부분...
만약 생성할수 없다면....메세지를 뛰운다는 말인가요...
ShowMessage 처럼....
그리고 꼭 사용해야 하나요...
어차피 제일 처음 if 에서 존재하지 않으니 다음 if로 가서 디렉토리 생성하면
무조건 생성되어야 하지 않나요.
procedure TForm1.Button1Click(Sender: TObject);
begin
if not DirectoryExists('c:\temp') then
if not CreateDir('C:\temp') then
raise Exception.Create('Cannot create c:\temp');
end;
|