Commit Graph

49 Commits

Author SHA1 Message Date
svenbarth
893cf511bc * fix casing of "VAr", no code changes
git-svn-id: trunk@48862 -
2021-03-02 08:06:05 +00:00
ondrej
34fecf90f3 SysUtils: add ExpandFileName with a BasePath overload
git-svn-id: trunk@43928 -
2020-01-13 12:36:35 +00:00
nickysn
5409450195 + ported and enabled compilation of unit sysutils for win16
git-svn-id: trunk@37734 -
2017-12-15 16:58:49 +00:00
marcus
6767ed7103 Amiga, AROS, MorphOS: Sysutils, GetDirs must also cut at DriveSeparator
git-svn-id: trunk@29294 -
2014-12-14 20:16:23 +00:00
marcus
ee31b188f6 AMIGA/MorphOS/AROS: corrected pathes in FP-IDE
git-svn-id: trunk@28620 -
2014-09-08 16:47:38 +00:00
marcus
97831bed8a Amiga, AROS, MorphOS: Define in IncludeTrailingPathDelimiter changed to HASAMIGA
git-svn-id: trunk@28548 -
2014-08-31 06:46:17 +00:00
marcus
5305a4d827 Amiga,AROS,MorphOS: IncludeTrailingPathDelimiter not adding DirectorySeparator after Driveseparator
git-svn-id: trunk@28541 -
2014-08-30 18:22:08 +00:00
michael
d9d1a7fa5d * Fix bug ID #18550
git-svn-id: trunk@27774 -
2014-05-11 17:14:20 +00:00
michael
17e34abc62 * Fix for bug ID #18551
git-svn-id: trunk@27773 -
2014-05-11 17:02:56 +00:00
Jonas Maebe
5d389e99fd * always use the *W version of the Windows API in ExtractShortPathName() so
it works correctly regardless of white kind of string is passed in
  (and return a string encoded in DefaultRTLFileSystemCodePage)

git-svn-id: trunk@26450 -
2014-01-13 22:21:09 +00:00
Jonas Maebe
2da7c3f05c * changed declarations in finah.inc and diskh.inc from ansistring to
rawbytestring
  * DoDirSeparators() and GetDirs() marked as "rtlproc" so they can accept
    non-rawbytestring arguments as their var-parameters

git-svn-id: branches/cpstrrtl@25306 -
2013-08-19 22:04:40 +00:00
Jonas Maebe
91079d1327 * ensure that constant string concatenations don't result in converting
input strings to DefaultSystemCodePage

git-svn-id: branches/cpstrrtl@25303 -
2013-08-19 22:04:29 +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
b08d8091b2 * made fexpand unicodestring-safe (use charinset instead of "in" --
"widechar in set" compiles, but results in a runtime conversion of
    the widechar into an ansistring and then getting the first character
    of that ansistring, which is horribly slow -- and Delphi-incompatible,
    but introduced a long time ago because of bug #7758)
  * replaced all "in" operations in sysutils fina.inc with CharInSet for
    the same reason
  * replaced all "string" declarations in finah.inc/fina.inc with "PathStr"
    and "pchar" with "PathPChar", and include them twice in sysutilh.inc/
    sysutils.inc, once with PathStr=UnicodeString/PathPChar=PWideChar and
    once with PathStr=AnsiString/PathPChar=PAnsiChar (not rawbytestring
    because there are several routines with var-parameters and then the
    string type has to match exactly; the "rtlproc" modifier could circumvent
    this, but should be used sparingly, and additionally the routine's
    internals would then first also have to be reviewed to ensure that at
    no point they start mixing in strings with the defaultsystemcodepage
    (e.g. directory separators) without first adjusting their codepage)
  * call GetShortPathNameA or GetShortPathNameW in ExtractShortPathName on
    Windows depending on whether we are parsing the RawByteString/UnicodeString
    version of fina.inc
  + ExpandUNCFileName(unicode) version for Windows, let its
    ExpandUNCFileName(ansistring) call the unicode version (avoid data loss
    due to ansi conversion) and convert the result to
    DefaultRTLFileSystemCodePage (to have no more data loss than what's
    specified by the user)

git-svn-id: branches/cpstrrtl@24999 -
2013-06-27 21:38:10 +00:00
Jonas Maebe
95a877c7e5 * moved GetFileHandle() from fina.inc to filutil.inc because fina.inc
will be included twice using different string types (and those two
    routines don't have a string argument, so this would result in duplicate
    definitions), and their declaration is in filutilh.inc rather than
    finah.inc anyway
  * ensure that the fina.inc "MaxDirs" constant gets declared only once
  * ensure that the finah.inc "TFilenameCaseMatch" type gets declared only
    once

git-svn-id: branches/cpstrrtl@24994 -
2013-06-27 21:37:51 +00:00
Károly Balogh
60879c9c4f also return the colon for ExtractFileDrive on Amiga/MorphOS
git-svn-id: trunk@24765 -
2013-06-02 11:37:29 +00:00
Károly Balogh
7ce3b803b3 basic Amiga/MorphOS support into ExtractFileDrive
git-svn-id: trunk@24683 -
2013-05-31 23:53:47 +00:00
Jonas Maebe
349a682596 * corrected license header from GPL to LGPL + static linking exception like
the rest of the FPC RTL, after confirming with the original author that
    this is ok (mantis #22879)

git-svn-id: trunk@22413 -
2012-09-17 12:12:42 +00:00
Tomas Hajny
99a9955195 + ExpandFileNameCase implementation added
git-svn-id: trunk@21466 -
2012-06-02 22:30:08 +00:00
michael
908f9865d4 * Fixed ExcludeLeadingPathDelimiter
git-svn-id: trunk@19316 -
2011-10-01 21:47:58 +00:00
sergei
907e7a32d5 * GetFileHandle(), THandleStream: changed type that is used to store file handle from Integer to THandle, so it can be redefined to 64 bits on certain platforms, see http://lists.freepascal.org/lists/fpc-devel/2010-November/023019.html
git-svn-id: trunk@16383 -
2010-11-20 12:58:53 +00:00
ivost
980c353421 * added function IncludeLeadingPathDelimiter: it adds a path delimiter in front of a path
* added function ExcludeLeadingPathDelimiter: it removes a path delimiter in front of a path
* added function ConcatPaths: it concats multiple path fragments, path delimiters are added if necessary

git-svn-id: trunk@15167 -
2010-04-24 21:05:05 +00:00
florian
6dfd5cb5b8 * fix ExtractFileDrive for \\server\share\path\file: it should return \\server\share
* made test easier to debug

git-svn-id: trunk@13392 -
2009-07-15 20:40:34 +00:00
peter
8c0adc7f3d * fixed also ExtractFileName
git-svn-id: trunk@10108 -
2008-01-29 23:30:30 +00:00
peter
496212d5c4 * fixed ExtractFileExt broken after previous commit
git-svn-id: trunk@10107 -
2008-01-29 23:23:25 +00:00
peter
f4f3ae84d0 * AllowDirectorySeparators and AllowDriveSeparators typed constants
added to allow customization of path and directory parsing in the rtl
  * Use the new sets instead of the hardcoded / and \

git-svn-id: trunk@10105 -
2008-01-29 23:04:56 +00:00
michael
eec321b2f8 * Implemented ExtractShortPathName
git-svn-id: trunk@9595 -
2007-12-30 21:45:48 +00:00
peter
544cf539e1 * fix for relativepath, fixes #10224
git-svn-id: trunk@9312 -
2007-11-21 21:51:42 +00:00
peter
732abba1f2 * all functions use DirSeparators. This is required to be able to have consistent
result values that can be used as input values. A problem with inconsitency was
    in ForceDirectories where excludetrailingpathdelimiter did not remove a / under win32
    and ExtractFilePath found the / as a separator. With the end result an infinite loop.

git-svn-id: trunk@9290 -
2007-11-18 21:40:17 +00:00
Jonas Maebe
1445ca1198 * fixed GetDirs in case the last character of the passed directory
= PathDelim (called like that from the compiler)

git-svn-id: trunk@9274 -
2007-11-17 19:53:33 +00:00
Tomas Hajny
4d9e404403 * remove GetEnv dependency
git-svn-id: trunk@3729 -
2006-05-28 22:27:27 +00:00
Tomas Hajny
a9b515c0bf * fexpand defines kept in platform specific sysutils.pp
git-svn-id: trunk@3726 -
2006-05-28 21:29:26 +00:00
florian
2a62055580 + added expand defines for all OSes, hopefully no OS forgotten
git-svn-id: trunk@3708 -
2006-05-27 21:30:35 +00:00
peter
da85b3db8c * fix linux build
git-svn-id: trunk@3626 -
2006-05-22 06:57:41 +00:00
peter
0237088689 * remove dos unit from sysutils
git-svn-id: trunk@3620 -
2006-05-21 20:17:17 +00:00
michael
b9a0fae596 * Fixed bug #6491, fileextdrive
git-svn-id: trunk@3560 -
2006-05-18 12:45:03 +00:00
michael
cbdda429c5 + Patch from Graeme Geldenhuys to fix ExtractFileDrive
git-svn-id: trunk@2359 -
2006-01-28 18:10:07 +00:00
peter
9b0c8269bc * remove also 255 limit for ExtractFileExt
git-svn-id: trunk@2033 -
2005-12-23 10:02:21 +00:00
marco
5008bb74b1 * removed 255 char limit in extractfilename
git-svn-id: trunk@2032 -
2005-12-23 09:41:19 +00:00
florian
bf311fd100 + ExpandUNCFilename for win32 from Klaus Hartnegg
git-svn-id: trunk@715 -
2005-07-20 18:39:21 +00:00
florian
64c72bd312 * patch from Joost van der Sluis to remove VIRTUALPASCAL define since VP is officially dead
git-svn-id: trunk@374 -
2005-06-10 17:05:35 +00:00
peter
4ace790492 * remove $Log
git-svn-id: trunk@231 -
2005-06-07 09:47:55 +00:00
fpc
790a4fe2d3 * log and id tags removed
git-svn-id: trunk@42 -
2005-05-21 09:42:41 +00:00
fpc
50778076c3 initial import
git-svn-id: trunk@1 -
2005-05-16 18:37:41 +00:00
peter
e417e34496 * truncate log 2005-02-14 17:13:06 +00:00
marco
ed0c42b2eb * Removed a "unix." prefix 2004-10-30 20:49:32 +00:00
marco
5af746ce28 * fileno -> getfilehandle 2004-05-01 11:56:25 +00:00
marco
b82160ba33 * fileno 2004-05-01 11:04:34 +00:00
peter
3d27318cb2 * moved classes unit to rtl 2003-10-06 21:01:06 +00:00