Delphi Drawers

ファイルをコピー

ファイルをコピーします。

function fnCopyFile(strBfreFilePath:string; strAftrFilePath:string):boolean;
var
  RS:TResourceStream;
begin
  result := False;
  if fnCreateFolder(fnGetFolderPathByFilePath(strAftrFilePath)) then begin
    try
      if FileExists(strBfreFilePath) then begin
        result := CopyFile(Pchar(strBfreFilePath),Pchar(strAftrFilePath),False);
      end;
    except
      result := False;
    end;
  end;
end;
function fnCreateFolder(strFolderPath:string):boolean;
begin
  if fnFolderExists(strFolderPath) then begin
    fnCreateFolder := True;
  end else begin
    fnCreateFolder := ForceDirectories(strFolderPath);
  end;
end;
Copyright © 2006 Hikijishi All Rights Reserved.
[] [delphi][0.00244903564453125]