summaryrefslogtreecommitdiff
path: root/systemunit.pas
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-05-11 09:27:13 +0200
committerErich Eckner <git@eckner.net>2016-05-11 09:27:13 +0200
commitbb035c1e54d3186189215831766c1cf2227bd1ba (patch)
treea0188e8046b64725dccf970dd2b4994cc98972a9 /systemunit.pas
parentb972c8d658f4338d2a030cc1beb05f544e1a45cb (diff)
downloadunits-bb035c1e54d3186189215831766c1cf2227bd1ba.tar.xz
systemunit.pas: pwd neu
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