septum_0.0.7_88e658ca/src/windows/sp-platform.adb

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
with Ada.Directories;
with Ada.Environment_Variables;

package body SP.Platform is

    function Home_Dir return String is
        package Env renames Ada.Environment_Variables;
        User_Profile : constant String := "HOME";
    begin
        if Env.Exists (User_Profile) then
            return Ada.Directories.Full_Name (Env.Value (User_Profile));
        else
            -- TODO: Add a better fallback case here.
            return "";
        end if;
    end Home_Dir;

    function Path_Separator return Character is ('\');
    function Path_Opposite_Separator return Character is ('/');

end SP.Platform;