summaryrefslogtreecommitdiff
path: root/src/corelib/gdi/gfx_utils.pas
blob: f5822fc6547f2b69b8ffebdfd535bffcf7669e3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
unit gfx_utils;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils; 
  
  
{$I gfx_utils_intf.inc}


implementation


// File utils
function ExtractTargetSymLinkPath(ALink: string): string;
begin
{
    var
      info : _stat;
    .....
    fullname := FDirectoryName + e.Name;
    if lstat(PChar(fullname),info) = 0 then
    begin
      e.IsLink := ((sr.Mode and $F000) = $A000);
      if e.IsLink then
      begin
        SetLength(e.LinkTarget, MAX_PATH);  // length was 256
        r := libc.readlink(PChar(fullname),@(e.LinkTarget[1]), sizeof(e.LinkTarget));
        if r > 0 then
          SetLength(e.LinkTarget, r)
        else
          e.LinkTarget := '';
        libc.stat(PChar(fullname), info);
      end;
}
end;

function FileIsSymlink(const AFilename: string): boolean;
begin
  Result := False;
end;


end.