summaryrefslogtreecommitdiff
path: root/systemunit.pas
diff options
context:
space:
mode:
Diffstat (limited to 'systemunit.pas')
-rw-r--r--systemunit.pas13
1 files changed, 13 insertions, 0 deletions
diff --git a/systemunit.pas b/systemunit.pas
index 5341b39..1d28924 100644
--- a/systemunit.pas
+++ b/systemunit.pas
@@ -18,6 +18,7 @@ procedure shellExpand(s: string; out sa: tMyStringList); overload;
procedure shellExpand(var sa: tMyStringList); overload;
function mkTemp(s: string): string;
function myReadLink(s: string): string;
+function pwd: string;
implementation
@@ -247,6 +248,18 @@ begin
result:='';
if not runCommand('readlink',args,result) then
raise exception.create('Fehler beim Ausführen von ''readlink -f -n '+s+'''!');
+ result:=trim(result);
+end;
+
+function pwd: string;
+var
+ args: array of string;
+begin
+ setlength(args,0);
+ result:='';
+ if not runCommand('pwd',args,result) then
+ raise exception.create('Fehler beim Ausführen von ''pwd''!');
+ result:=trim(result);
end;
begin