Commit Graph

110 Commits

Author SHA1 Message Date
Pierre Muller
17fc9aa60b Add required OS2Api. prefix for dotted units 2023-08-04 12:28:46 +02:00
Michael VAN CANNEYT
ccfa38c68e * Dotted RTL compiles 2023-07-27 19:04:03 +02:00
Michael VAN CANNEYT
78374bf772 * Synchronize API for AnsiString/Unicode string, keep string where possible. 2023-07-24 15:38:09 +02:00
Michael VAN CANNEYT
d88a7c2e24 * Char -> AnsiChar 2023-07-14 17:26:10 +02:00
Tomas Hajny
95394d7f98 + added TZ variable based offset calculation
git-svn-id: trunk@47535 -
2020-11-23 01:08:39 +00:00
Tomas Hajny
ba84c70356 * Corrections of omissions in GetLocalTime
git-svn-id: trunk@47528 -
2020-11-22 15:53:50 +00:00
Tomas Hajny
9ce1d0e509 * fix for TAbstractSearchRec.Time type change
git-svn-id: trunk@44113 -
2020-02-04 22:04:34 +00:00
Tomas Hajny
e790cb067d * fix of FileSetDate after int64 changes (r44010 and r44013)
git-svn-id: trunk@44018 -
2020-01-22 12:14:47 +00:00
florian
69956cd97a * fix compilation on several OSes after r44010
git-svn-id: trunk@44013 -
2020-01-21 21:50:37 +00:00
florian
01302bc47d * subroutines working with an OS dependend time stamp use an int64 now, so the 2038 problem
on unixes can be tackled

git-svn-id: trunk@44010 -
2020-01-21 20:59:20 +00:00
svenbarth
c26348a3dd * follow up to r42457: FreeTerminateProcs needs to be called before DoneExceptions just in case an exception is triggered due to a corrupted list
git-svn-id: trunk@42461 -
2019-07-20 08:41:59 +00:00
svenbarth
176a63b67b * fix for Mantis #35862: free the list of functions added with AddTerminateProc to avoid memory leaks
+ added test

git-svn-id: trunk@42457 -
2019-07-19 15:55:21 +00:00
svenbarth
09e5f463dc + add Delphi-compatible FileGetSymLinkTarget functions to all platforms (currently returns False on all platforms); this also includes TSymLinkRec variants for both RawByteString and UnicodeString
git-svn-id: trunk@39669 -
2018-08-24 15:33:45 +00:00
svenbarth
92dcdd8b5b + add Delphi compatible FollowLink parameter (default is True) to FileExists and DirectoryExists; support for it is up to each target
git-svn-id: trunk@39668 -
2018-08-24 15:33:09 +00:00
Tomas Hajny
293d9be6b6 * fix compilation after UnicodeString ExecuteProcess related changes
git-svn-id: trunk@33899 -
2016-06-03 23:57:51 +00:00
Tomas Hajny
c1afb4b63b * avoid FindFirst failing due to Attribute parameter bigger than $FF
git-svn-id: trunk@33894 -
2016-06-03 21:16:35 +00:00
michael
fde42ca8ef * Type helpers, compatible to Delphi XE 8
git-svn-id: trunk@32262 -
2015-11-07 09:40:54 +00:00
Tomas Hajny
ebd1c6026c * fix FileSetAttr - bug #28826
git-svn-id: trunk@32019 -
2015-10-11 18:30:29 +00:00
Tomas Hajny
d676a503c0 * fix returned value for FileRead and FileWrite in case of an error and change the default sharing mode to doDenyRW to be compatible with other platforms
git-svn-id: trunk@29668 -
2015-02-10 23:46:06 +00:00
Tomas Hajny
1dceddc302 * minor update of the GetLastOSError support infrastructure
git-svn-id: trunk@29179 -
2014-11-29 01:43:38 +00:00
Tomas Hajny
f330d2e981 * fix for random memory corruption introduced in r28975
git-svn-id: trunk@29017 -
2014-11-08 00:01:13 +00:00
Tomas Hajny
fa89dca059 * make LastOSError accessible earlier
git-svn-id: trunk@29001 -
2014-11-06 12:15:27 +00:00
Tomas Hajny
5d0bd53433 * remove fixed limit for overall size of arguments for Dos.Exec and SysUtils.ExecuteProcess
git-svn-id: trunk@28975 -
2014-11-03 17:00:55 +00:00
Tomas Hajny
8cd2b615ce * added (limited) GetLastOSError by emulation of Win32 and *nix behaviour in the RTL
git-svn-id: trunk@28947 -
2014-10-30 14:44:03 +00:00
Jonas Maebe
b106ded0e9 * use SystemFileName instead of the original FileName in DeleteFile()
git-svn-id: trunk@26365 -
2014-01-03 10:59:25 +00:00
Jonas Maebe
af3f12f60c * rawbytestring/unicodestring versions of findfirst/findnext/findclose
o these routines are now generic wrappers in filutil.inc, and call
     the platform-dependent internalfindfirst/next/close routines
   o on unix, the fnmatch routine got proper support for UTF-8 matching
     (e.g., it won't match a partial UTF-8 code point to a "?" wildcard)
   o for NativeNT, a similar (untested) UTF-16 version has been added
  + test for the above
  * rawbytestring/unicodestring versions of fileage

git-svn-id: branches/cpstrrtl@25302 -
2013-08-19 22:04:25 +00:00
Jonas Maebe
155aafc255 * moved SYSUTILS_HAS_ANSISTR/UNICODESTR_FILEUTIL_IMPL define to interface
so declarations can also depend on it and similar defines (not yet the
    case)
  + added SYSUTILS_HAS_ANSISTR_ENVVAR_IMPL/SYSUTILS_HAS_UNICODESTR_ENVVAR_IMPL
    to indicate whether the platform-dependent part of the unit provides
    an ansistring/unicodestring interface to get environment variables
  + Windows version of getenvironmentvariable(unicodestring)
  + generic ansistring/unicodestring versions of GetEnvironmentVariable()
    in case the platform doesn't provide them
  * result of GetEnvironmentString() is ansistring/unicodestring depending
    on the state of the FPC_RTL_UNICODE define

git-svn-id: branches/cpstrrtl@25116 -
2013-07-16 14:16:34 +00:00
Jonas Maebe
eeb98a0c0f - removed platform-specific implementations of GetCurrentDir, SetCurrentDir,
CreateDir and RemoveDir, and implemented a generic one (based on the OS/2
    version) in the shared sysutils code (so that the filesystem code page
    support for the system unit routines can be reused)
  * include both ansistring and unicodestring versions of the above routines,
    and of ForceDirectories. Exception: GetCurrentDir, which cannot be
    overloaded based on function result and whose return type currently
    dependends on the FPC_UNICODE_RTL define

git-svn-id: branches/cpstrrtl@25113 -
2013-07-16 14:15:55 +00:00
Jonas Maebe
06d9b35ed3 * don't truncate the result of GetEnvironmentVariable to 255 characters
git-svn-id: branches/cpstrrtl@25105 -
2013-07-15 09:21:51 +00:00
Jonas Maebe
26b2149ced * converted the following sysutils routines to unicodestring and
rawbytestring: FileExists, DirectoryExists, FileSetDate, FileGetAttr,
    FileSetAttr, DeleteFile, RenameFile, FileSearch, ExeSearch,
    FileIsReadOnly

git-svn-id: branches/cpstrrtl@25078 -
2013-07-09 19:01:45 +00:00
Jonas Maebe
ecd3cba02b * synchronised with trunk up to r24912
o resolved conflict in updated morphos sysutils unit
   o moved code that had been added to the now deleted  sysunix.inc to the
     unix-specific block of the fpwidestring unit's init code

git-svn-id: branches/cpstrrtl@24913 -
2013-06-17 20:50:02 +00:00
Tomas Hajny
2f25717e67 * GetTickCount(64) implementation for OS/2 added
git-svn-id: trunk@23239 -
2012-12-28 12:53:55 +00:00
Jonas Maebe
a3c936fe5f + rawbytestring/unicodestring overloads for FileCreate and FileOpen.
The WinCE implementation converts the rawbytestring arguments to
    unicodestring and calls unicode OS APIs, while the others convert
    unicodestring arguments to DefaultFileSystemCodePage and call
    single byte OS APIs
  + test for the above

git-svn-id: branches/cpstrrtl@22467 -
2012-09-27 07:54:25 +00:00
Tomas Hajny
225cc1c1e0 * fix FileExists/DirectoryExists wrongly accepting non-existing entries with wrong path due to path normalization using ExpandFileName (correctly) accepting also non-existing paths
git-svn-id: trunk@20890 -
2012-04-15 19:46:33 +00:00
Tomas Hajny
49a7b48fe0 * proper support for ExecInheritsHandles in Flags
git-svn-id: trunk@19368 -
2011-10-04 22:10:21 +00:00
Tomas Hajny
f13c5fae05 * additional fixes for ExecuteProcess - running of DOS programs in current directory and proper closing of the created queue
git-svn-id: trunk@19323 -
2011-10-02 01:41:56 +00:00
Tomas Hajny
e9f6afe5e0 * fix for ExecuteProcess - starting of different executable types works properly now; dependency on unit Dos removed; redefinitions of imports from DosCalls removed also - unit DosCalls used directly now
git-svn-id: trunk@19319 -
2011-10-01 23:10:22 +00:00
Tomas Hajny
7f7a4518f7 * FileExists fixed - wildcards not accepted any longer
git-svn-id: trunk@18846 -
2011-08-25 21:34:44 +00:00
Tomas Hajny
6aecc69389 * FindFirst enhanced for file sizes >2 GB
git-svn-id: trunk@18843 -
2011-08-25 21:17:30 +00:00
Tomas Hajny
867ad94115 * fix for DirectoryExists - proper handling of root directory
git-svn-id: trunk@18186 -
2011-08-13 00:06:14 +00:00
Tomas Hajny
cbe040bcc7 * more complete/safer checking of sharing mode values allowed by OS/2
git-svn-id: trunk@17564 -
2011-05-26 21:11:09 +00:00
Tomas Hajny
39312473cb * real implementation for FileCreate with ShareMode
git-svn-id: trunk@17563 -
2011-05-26 20:37:43 +00:00
michael
a201f07420 * Added share mode argument to FileCreate call
git-svn-id: trunk@17548 -
2011-05-23 21:11:07 +00:00
mazen
86d9eadc73 * Fixed spell errors.
git-svn-id: trunk@17177 -
2011-03-25 09:33:15 +00:00
mazen
b127fc154a * Fixed spell error revealed by lintian.
git-svn-id: trunk@16094 -
2010-10-06 20:33:57 +00:00
marco
be98b13554 * fix for 11263, changed fileread and fd_zero to out using $modeswitch.
git-svn-id: trunk@14965 -
2010-03-01 22:35:14 +00:00
marco
8e9a7e14ad * Revised yesterday solution to a more general one. Executeprocess gets
another parameter, a set type with flags, default = []

git-svn-id: trunk@14572 -
2010-01-07 20:49:28 +00:00
michael
01ed4a6745 * Implemented OnBeep to install custom beep handler
git-svn-id: trunk@14254 -
2009-11-22 17:33:56 +00:00
michael
ddd02b7f26 * Change so that when FindFirst initially returns nonzero, FindClose is no longer needed (Windows compatible)
git-svn-id: trunk@13210 -
2009-05-29 07:27:41 +00:00
Tomas Hajny
5e1a7997ee + FileTruncate allows 64-bit parameter
git-svn-id: trunk@6727 -
2007-03-05 23:47:10 +00:00