summaryrefslogtreecommitdiff
path: root/systemunit.pas
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-03-07 10:16:48 +0100
committerErich Eckner <git@eckner.net>2016-03-15 13:01:15 +0100
commit839175b39e4086921af3ed81de9ff4840216a5bc (patch)
tree2aaaf6fb1b635e53bf9f179c9aee525b2c3eed6e /systemunit.pas
parentf515252dd30e996dbf110db4ae769651a3b13c4f (diff)
downloadunits-839175b39e4086921af3ed81de9ff4840216a5bc.tar.xz
myReadLink 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 de0e699..a716d43 100644
--- a/systemunit.pas
+++ b/systemunit.pas
@@ -14,6 +14,7 @@ function belegterSpeicher: int64;
function minCache: int64;
function shellSubst(s: string): string;
function mkTemp(s: string): string;
+function myReadLink(s: string): string;
implementation
@@ -147,6 +148,18 @@ begin
result:=trim(result);
end;
+function myReadLink(s: string): string;
+var
+ args: array of string;
+begin
+ setlength(args,3);
+ args[0]:='-f';
+ args[1]:='-n';
+ args[2]:=s;
+ if not runCommand('readlink',args,result) then
+ raise exception.create('Fehler beim Ausführen von ''readlink -f -n '+s+'''!');
+end;
+
begin
_cpuLastUsed:=0;
_cpuLastIdle:=0;