Files
alire-index-community/src/alire-releases.adb
T
2018-02-11 13:56:29 +01:00

21 lines
529 B
Ada

with GNAT.OS_Lib;
package body Alire.Releases is
--------------
-- Checkout --
--------------
procedure Checkout (R : Release; Parent_Folder : String) is
use GNAT.OS_Lib;
Folder : constant String := Parent_Folder & Directory_Separator & R.Unique_Folder;
begin
if Is_Directory (Folder) then
raise File_Error with "Destination of checkout already exists.";
else
R.Repository.Constant_Reference.Checkout (R.Id, Folder);
end if;
end Checkout;
end Alire.Releases;