diff options
author | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-08-24 15:33:09 +0000 |
---|---|---|
committer | svenbarth <svenbarth@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2018-08-24 15:33:09 +0000 |
commit | 97b1326d7ba603ebc1614f05fae1e606276c4795 (patch) | |
tree | dc534fd54c02fc20152daee51c4f6bc3e99e28f7 /rtl | |
parent | 5f1101b757abfdbe4784bc9b96e3bcc205ef04e5 (diff) | |
download | fpc-97b1326d7ba603ebc1614f05fae1e606276c4795.tar.gz |
+ add Delphi compatible FollowLink parameter (default is True) to FileExists and DirectoryExists; support for it is up to each target
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@39668 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl')
-rw-r--r-- | rtl/amicommon/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/atari/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/embedded/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/emx/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/gba/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/go32v2/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/macos/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/msdos/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/nativent/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/nds/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/netware/sysutils.pp | 6 | ||||
-rw-r--r-- | rtl/netwlibc/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/objpas/sysutils/filutil.inc | 16 | ||||
-rw-r--r-- | rtl/objpas/sysutils/filutilh.inc | 8 | ||||
-rw-r--r-- | rtl/os2/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/symbian/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/unix/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/watcom/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/wii/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/win/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/win16/sysutils.pp | 4 | ||||
-rw-r--r-- | rtl/wince/sysutils.pp | 4 |
22 files changed, 53 insertions, 53 deletions
diff --git a/rtl/amicommon/sysutils.pp b/rtl/amicommon/sysutils.pp index 65c1a03b48..e9ace9edc2 100644 --- a/rtl/amicommon/sysutils.pp +++ b/rtl/amicommon/sysutils.pp @@ -396,7 +396,7 @@ begin end; -function FileExists (const FileName : RawByteString) : Boolean; +function FileExists (const FileName : RawByteString; FollowLink : Boolean) : Boolean; var tmpLock: BPTR; tmpFIB : PFileInfoBlock; @@ -702,7 +702,7 @@ begin DiskFree := DiskFree(DeviceList[Drive]); end; -function DirectoryExists(const Directory: RawByteString): Boolean; +function DirectoryExists(const Directory: RawByteString; FollowLink : Boolean): Boolean; var tmpLock: BPTR; FIB : PFileInfoBlock; diff --git a/rtl/atari/sysutils.pp b/rtl/atari/sysutils.pp index 10200a9000..17a3d677a0 100644 --- a/rtl/atari/sysutils.pp +++ b/rtl/atari/sysutils.pp @@ -216,7 +216,7 @@ begin end; -function FileExists (const FileName : RawByteString) : Boolean; +function FileExists (const FileName : RawByteString; FollowLink : Boolean) : Boolean; var Attr: longint; begin @@ -372,7 +372,7 @@ begin DiskFree:=di.b_free * di.b_secsiz * di.b_clsiz; end; -function DirectoryExists(const Directory: RawByteString): Boolean; +function DirectoryExists(const Directory: RawByteString; FollowLink : Boolean): Boolean; var Attr: longint; begin diff --git a/rtl/embedded/sysutils.pp b/rtl/embedded/sysutils.pp index e5e56b321c..30dcd6ac94 100644 --- a/rtl/embedded/sysutils.pp +++ b/rtl/embedded/sysutils.pp @@ -135,7 +135,7 @@ begin end; -Function FileExists (Const FileName : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean; Begin result := false; end; @@ -191,7 +191,7 @@ Begin End; -function DirectoryExists(const Directory: RawByteString): Boolean; +function DirectoryExists(const Directory: RawByteString; FollowLink : Boolean): Boolean; begin result := false; end; diff --git a/rtl/emx/sysutils.pp b/rtl/emx/sysutils.pp index 58fa68bbd3..b337dc84eb 100644 --- a/rtl/emx/sysutils.pp +++ b/rtl/emx/sysutils.pp @@ -661,7 +661,7 @@ begin end; -function FileExists (const FileName: RawByteString): boolean; +function FileExists (const FileName: RawByteString; FollowLink : Boolean): boolean; var L: longint; begin @@ -1050,7 +1050,7 @@ begin end; -function DirectoryExists (const Directory: RawByteString): boolean; +function DirectoryExists (const Directory: RawByteString; FollowLink : Boolean): boolean; var L: longint; begin diff --git a/rtl/gba/sysutils.pp b/rtl/gba/sysutils.pp index c7eeb472c6..5fc1e8749f 100644 --- a/rtl/gba/sysutils.pp +++ b/rtl/gba/sysutils.pp @@ -146,7 +146,7 @@ begin end; -Function FileExists (Const FileName : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean; Begin result := false; end; @@ -204,7 +204,7 @@ Begin End; -function DirectoryExists(const Directory: RawByteString): Boolean; +function DirectoryExists(const Directory: RawByteString; FollowLink : Boolean): Boolean; begin result := false; end; diff --git a/rtl/go32v2/sysutils.pp b/rtl/go32v2/sysutils.pp index 422728fb5e..b991d9ba03 100644 --- a/rtl/go32v2/sysutils.pp +++ b/rtl/go32v2/sysutils.pp @@ -298,7 +298,7 @@ begin end; -function FileExists (const FileName: RawByteString): boolean; +function FileExists (const FileName: RawByteString; FollowLink : Boolean): boolean; var L: longint; begin @@ -314,7 +314,7 @@ begin end; -Function DirectoryExists (Const Directory : RawByteString) : Boolean; +Function DirectoryExists (Const Directory : RawByteString; FollowLink : Boolean) : Boolean; Var Dir : RawByteString; drive : byte; diff --git a/rtl/macos/sysutils.pp b/rtl/macos/sysutils.pp index 67b1d3bcd8..baa27ac69c 100644 --- a/rtl/macos/sysutils.pp +++ b/rtl/macos/sysutils.pp @@ -210,7 +210,7 @@ begin end; -Function FileExists (Const FileName : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean; (* Var Info : Stat; @@ -223,7 +223,7 @@ begin end; -Function DirectoryExists (Const Directory : RawByteString) : Boolean; +Function DirectoryExists (Const Directory : RawByteString; FollowLink : Boolean) : Boolean; (* Var Info : Stat; diff --git a/rtl/msdos/sysutils.pp b/rtl/msdos/sysutils.pp index 09444f72e2..fadb086d27 100644 --- a/rtl/msdos/sysutils.pp +++ b/rtl/msdos/sysutils.pp @@ -303,7 +303,7 @@ begin end; -function FileExists (const FileName: RawByteString): boolean; +function FileExists (const FileName: RawByteString; FollowLink : Boolean): boolean; var L: longint; begin @@ -318,7 +318,7 @@ begin end; -Function DirectoryExists (Const Directory : RawByteString) : Boolean; +Function DirectoryExists (Const Directory : RawByteString; FollowLink : Boolean) : Boolean; Var Dir : RawByteString; drive : byte; diff --git a/rtl/nativent/sysutils.pp b/rtl/nativent/sysutils.pp index 8a7eafb97a..a7546ced37 100644 --- a/rtl/nativent/sysutils.pp +++ b/rtl/nativent/sysutils.pp @@ -320,7 +320,7 @@ begin end; -function FileExists(const FileName: UnicodeString): Boolean; +function FileExists(const FileName: UnicodeString; FollowLink : Boolean): Boolean; var ntstr: UNICODE_STRING; objattr: OBJECT_ATTRIBUTES; @@ -341,7 +341,7 @@ begin end; -function DirectoryExists(const Directory : UnicodeString) : Boolean; +function DirectoryExists(const Directory : UnicodeString; FollowLink : Boolean) : Boolean; var ntstr: UNICODE_STRING; objattr: OBJECT_ATTRIBUTES; diff --git a/rtl/nds/sysutils.pp b/rtl/nds/sysutils.pp index 641c7112e5..e6f9ce6ed1 100644 --- a/rtl/nds/sysutils.pp +++ b/rtl/nds/sysutils.pp @@ -179,7 +179,7 @@ begin end; -Function FileExists (Const FileName : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean; var SystemFileName: RawByteString; begin @@ -248,7 +248,7 @@ Begin End; -function DirectoryExists(const Directory: RawByteString): Boolean; +function DirectoryExists(const Directory: RawByteString; FollowLink : Boolean): Boolean; begin result := false; end; diff --git a/rtl/netware/sysutils.pp b/rtl/netware/sysutils.pp index 1aca9745f0..7383b2af73 100644 --- a/rtl/netware/sysutils.pp +++ b/rtl/netware/sysutils.pp @@ -230,7 +230,7 @@ begin end; -Function FileExists (Const FileName : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean; VAR Info : NWStatBufT; SystemFileName: RawByteString; begin @@ -238,7 +238,7 @@ begin FileExists:=(_stat(pchar(SystemFileName),Info) = 0); end; -Function DirectoryExists (Const Directory : RawByteString) : Boolean; +Function DirectoryExists (Const Directory : RawByteString; FollowLink : Boolean) : Boolean; Var Dir : RawByteString; drive : byte; @@ -497,7 +497,7 @@ Begin End; -function DirectoryExists (const Directory: string): boolean; +function DirectoryExists (const Directory: string; FollowLink : Boolean): boolean; var Info : NWStatBufT; SystemFileName: RawByteString; diff --git a/rtl/netwlibc/sysutils.pp b/rtl/netwlibc/sysutils.pp index be20af62fe..b7c73e54e7 100644 --- a/rtl/netwlibc/sysutils.pp +++ b/rtl/netwlibc/sysutils.pp @@ -218,7 +218,7 @@ begin end; -Function FileExists (Const FileName : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean; VAR Info : TStat; SystemFileName: RawByteString; begin @@ -503,7 +503,7 @@ Begin End; -function DirectoryExists (const Directory: RawByteString): boolean; +function DirectoryExists (const Directory: RawByteString; FollowLink : Boolean): boolean; var Info : TStat; SystemFileName: RawByteString; diff --git a/rtl/objpas/sysutils/filutil.inc b/rtl/objpas/sysutils/filutil.inc index 202c912bf1..ffc16e49f9 100644 --- a/rtl/objpas/sysutils/filutil.inc +++ b/rtl/objpas/sysutils/filutil.inc @@ -46,15 +46,15 @@ begin end; -Function FileExists (Const FileName : UnicodeString) : Boolean; +Function FileExists (Const FileName : UnicodeString; FollowLink : Boolean) : Boolean; begin - Result:=FileExists(ToSingleByteFileSystemEncodedFileName(FileName)); + Result:=FileExists(ToSingleByteFileSystemEncodedFileName(FileName), FollowLink); end; -Function DirectoryExists (Const Directory : UnicodeString) : Boolean; +Function DirectoryExists (Const Directory : UnicodeString; FollowLink : Boolean) : Boolean; begin - Result:=DirectoryExists(ToSingleByteFileSystemEncodedFileName(Directory)); + Result:=DirectoryExists(ToSingleByteFileSystemEncodedFileName(Directory), FollowLink); end; @@ -243,15 +243,15 @@ begin end; -Function FileExists (Const FileName : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean; begin - Result:=FileExists(UnicodeString(FileName)); + Result:=FileExists(UnicodeString(FileName), FollowLink); end; -Function DirectoryExists (Const Directory : RawByteString) : Boolean; +Function DirectoryExists (Const Directory : RawByteString; FollowLink : Boolean) : Boolean; begin - Result:=DirectoryExists(UnicodeString(Directory)); + Result:=DirectoryExists(UnicodeString(Directory), FollowLink); end; diff --git a/rtl/objpas/sysutils/filutilh.inc b/rtl/objpas/sysutils/filutilh.inc index 5435df7490..7bb0a7524b 100644 --- a/rtl/objpas/sysutils/filutilh.inc +++ b/rtl/objpas/sysutils/filutilh.inc @@ -135,8 +135,8 @@ Function FileCreate (Const FileName : UnicodeString; ShareMode : Integer; Rights {$IFNDEF FPUNONE} Function FileAge (Const FileName : UnicodeString): Longint; {$ENDIF} -Function FileExists (Const FileName : UnicodeString) : Boolean; -Function DirectoryExists (Const Directory : UnicodeString) : Boolean; +Function FileExists (Const FileName : UnicodeString; FollowLink : Boolean = True) : Boolean; +Function DirectoryExists (Const Directory : UnicodeString; FollowLink : Boolean = True) : Boolean; Function FileSetDate (Const FileName : UnicodeString;Age : Longint) : Longint; Function FileGetAttr (Const FileName : UnicodeString) : Longint; Function FileSetAttr (Const Filename : UnicodeString; Attr: longint) : Longint; @@ -155,8 +155,8 @@ Function FileOpen (Const FileName : RawByteString; Mode : Integer) : THandle; Function FileCreate (Const FileName : RawByteString) : THandle; Function FileCreate (Const FileName : RawByteString; Rights : Integer) : THandle; Function FileCreate (Const FileName : RawByteString; ShareMode : Integer; Rights : Integer) : THandle; -Function FileExists (Const FileName : RawByteString) : Boolean; -Function DirectoryExists (Const Directory : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean = True) : Boolean; +Function DirectoryExists (Const Directory : RawByteString; FollowLink: Boolean = True) : Boolean; Function FileSetDate (Const FileName : RawByteString;Age : Longint) : Longint; Function FileGetAttr (Const FileName : RawByteString) : Longint; Function FileSetAttr (Const Filename : RawByteString; Attr: longint) : Longint; diff --git a/rtl/os2/sysutils.pp b/rtl/os2/sysutils.pp index 694d555b47..60d8180338 100644 --- a/rtl/os2/sysutils.pp +++ b/rtl/os2/sysutils.pp @@ -228,7 +228,7 @@ begin end; -function FileExists (const FileName: RawByteString): boolean; +function FileExists (const FileName: RawByteString; FollowLink : Boolean): boolean; var L: longint; begin @@ -515,7 +515,7 @@ begin end; -function DirectoryExists (const Directory: RawByteString): boolean; +function DirectoryExists (const Directory: RawByteString; FollowLink : Boolean): boolean; var L: longint; begin diff --git a/rtl/symbian/sysutils.pp b/rtl/symbian/sysutils.pp index a334860fbc..dbe7416658 100644 --- a/rtl/symbian/sysutils.pp +++ b/rtl/symbian/sysutils.pp @@ -135,7 +135,7 @@ begin end; -Function FileExists (Const FileName : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean; Begin result := false; end; @@ -191,7 +191,7 @@ Begin End; -function DirectoryExists(const Directory: RawByteString): Boolean; +function DirectoryExists(const Directory: RawByteString; FollowLink : Boolean): Boolean; begin result := false; end; diff --git a/rtl/unix/sysutils.pp b/rtl/unix/sysutils.pp index 13d540f7cd..896a22ee40 100644 --- a/rtl/unix/sysutils.pp +++ b/rtl/unix/sysutils.pp @@ -609,7 +609,7 @@ begin end; -Function FileExists (Const FileName : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean; var SystemFileName: RawByteString; begin @@ -619,7 +619,7 @@ begin FileExists:=fpAccess(pointer(SystemFileName),F_OK)=0; end; -Function DirectoryExists (Const Directory : RawByteString) : Boolean; +Function DirectoryExists (Const Directory : RawByteString; FollowLink : Boolean) : Boolean; Var Info : Stat; SystemFileName: RawByteString; diff --git a/rtl/watcom/sysutils.pp b/rtl/watcom/sysutils.pp index 2def0e6979..987cb6ab4a 100644 --- a/rtl/watcom/sysutils.pp +++ b/rtl/watcom/sysutils.pp @@ -295,7 +295,7 @@ begin end; -function FileExists (const FileName: RawByteString): boolean; +function FileExists (const FileName: RawByteString; FollowLink : Boolean): boolean; var L: longint; begin @@ -311,7 +311,7 @@ begin end; -function DirectoryExists (const Directory: RawByteString): boolean; +function DirectoryExists (const Directory: RawByteString; FollowLink : Boolean): boolean; var L: longint; begin diff --git a/rtl/wii/sysutils.pp b/rtl/wii/sysutils.pp index dbc0e5b4b7..b8cf46f35d 100644 --- a/rtl/wii/sysutils.pp +++ b/rtl/wii/sysutils.pp @@ -144,7 +144,7 @@ begin end; -Function FileExists (Const FileName : RawByteString) : Boolean; +Function FileExists (Const FileName : RawByteString; FollowLink : Boolean) : Boolean; Begin result := false; end; @@ -202,7 +202,7 @@ Begin End; -function DirectoryExists(const Directory: RawByteString): Boolean; +function DirectoryExists(const Directory: RawByteString; FollowLink : Boolean): Boolean; begin result := false; end; diff --git a/rtl/win/sysutils.pp b/rtl/win/sysutils.pp index 0fe4c1b32f..cf083ee05b 100644 --- a/rtl/win/sysutils.pp +++ b/rtl/win/sysutils.pp @@ -407,7 +407,7 @@ begin end; -Function FileExists (Const FileName : UnicodeString) : Boolean; +Function FileExists (Const FileName : UnicodeString; FollowLink : Boolean) : Boolean; var Attr:Dword; begin @@ -420,7 +420,7 @@ begin end; -Function DirectoryExists (Const Directory : UnicodeString) : Boolean; +Function DirectoryExists (Const Directory : UnicodeString; FollowLink : Boolean) : Boolean; var Attr:Dword; begin diff --git a/rtl/win16/sysutils.pp b/rtl/win16/sysutils.pp index 319f8ebdb2..e6bca18930 100644 --- a/rtl/win16/sysutils.pp +++ b/rtl/win16/sysutils.pp @@ -329,7 +329,7 @@ begin end; -function FileExists (const FileName: RawByteString): boolean; +function FileExists (const FileName: RawByteString; FollowLink : Boolean): boolean; var L: longint; begin @@ -344,7 +344,7 @@ begin end; -Function DirectoryExists (Const Directory : RawByteString) : Boolean; +Function DirectoryExists (Const Directory : RawByteString; FollowLink : Boolean) : Boolean; Var Dir : RawByteString; drive : byte; diff --git a/rtl/wince/sysutils.pp b/rtl/wince/sysutils.pp index afc43bf9e4..5fc7e2a865 100644 --- a/rtl/wince/sysutils.pp +++ b/rtl/wince/sysutils.pp @@ -267,7 +267,7 @@ begin end; -Function FileExists (Const FileName : UnicodeString) : Boolean; +Function FileExists (Const FileName : UnicodeString; FollowLink : Boolean) : Boolean; var Attr:Dword; begin @@ -279,7 +279,7 @@ begin end; -Function DirectoryExists (Const Directory : UnicodeString) : Boolean; +Function DirectoryExists (Const Directory : UnicodeString; FollowLink : Boolean) : Boolean; var Attr:Dword; begin |