Commit Graph

49 Commits

Author SHA1 Message Date
juha
3470923dd4 LazUtils: Remove incorrect code dealing with strings on Windows, use SysUtils code instead. Issue #35512, patch from Serge Anvarov.
git-svn-id: trunk@61165 -
2019-05-06 14:24:37 +00:00
mattias
83e2e9a6cd lazutils: fixed ExpandFileNameUTF8 for \\?\
git-svn-id: trunk@59352 -
2018-10-26 08:10:10 +00:00
juha
920c072f0e LazUtils: Add, fix and unify header comments of many units.
git-svn-id: trunk@52518 -
2016-06-18 16:40:04 +00:00
mattias
69de6012ba lazfileutils: added windows function SHGetFolderPathUTF8
git-svn-id: trunk@51881 -
2016-03-09 13:15:53 +00:00
bart
f98b2e0ab7 LazUtils: Remove (obsolete) ansi implementations of File*UTF8 functions (Windows).
Part of removing specific Win9x code.

git-svn-id: trunk@51308 -
2016-01-17 15:38:02 +00:00
bart
a121cb2acc LazUtils: Fix implicit codepage ceversion issue for FindFirstUtf8/FindNextUtf8 (Windows). Patch by Michl. Issue #0028406.
git-svn-id: trunk@50567 -
2015-12-02 12:43:29 +00:00
bart
2a47550bba LazUtils: fix crash in ExpandFilenameUtf8 (Issue #0029098).
git-svn-id: trunk@50519 -
2015-11-28 15:48:40 +00:00
bart
0c8df133dd LazUtils:
- An attempt to unify the defines for the different scenario's in the use of (not) codepage aware ansistrings
  and the use of the "Utf8 in RTL" feature.
  It makes for better separation of code and thus better readability and ease of maintainance (and in a later
  stadium it makes it easier to remove code that deals with non codepage aware ansistrings (fpc < 3.0)).
- Also replace (FPC_FULLVERSION >= xxxx) with FPC_HAS_CPSTRING where appropriate.
- Replace the custom HasCP define with built in FPC_HAS_CPSTRING define.

git-svn-id: trunk@50498 -
2015-11-24 16:23:18 +00:00
bart
0493a91c19 LazUtils: Less hints.
git-svn-id: trunk@50497 -
2015-11-24 14:24:12 +00:00
bart
094b14ce22 LazUtils: remove legacy code for the 2.6.0 compiler.
git-svn-id: trunk@50496 -
2015-11-24 14:06:50 +00:00
juha
5fc7132693 Use the new UTF-8 system by default. Can be disabled by define DisableUTF8RTL. EnableUTF8RTL is removed.
git-svn-id: trunk@50129 -
2015-10-20 17:20:11 +00:00
juha
5642758bf1 LazUtils: Fix TFileSearcher encoding when -dEnableUTF8RTL is not used. Issue #28406, patch from Michl.
git-svn-id: trunk@49888 -
2015-09-28 19:57:52 +00:00
bart
8f7215b840 LazFileUtils: FileIsReadable on Windows should only return True if the file actually exists.
git-svn-id: trunk@49543 -
2015-07-14 10:25:53 +00:00
bart
d38d2f788b LazFileUtils: fix compilation of GetShellLinkTargetAnsi for fpc 2.6.2.
git-svn-id: trunk@47324 -
2015-01-09 01:17:36 +00:00
bart
a19b786147 LazFileUtils: less hints.
git-svn-id: trunk@46745 -
2014-11-03 15:54:06 +00:00
bart
3ebbc96fd0 LazFileUtils: implement GetShellLinkTarget function.
git-svn-id: trunk@46434 -
2014-10-04 22:15:41 +00:00
mattias
cccbde05f6 lazutils: wince: fixed compilation
git-svn-id: trunk@46265 -
2014-09-20 12:35:29 +00:00
mattias
0d7fcf4e66 lazutils: added GetPhysicalFilename
git-svn-id: trunk@45241 -
2014-05-30 12:20:17 +00:00
mattias
877c4d50b9 LCL: moved ReadAllLinks to LazUtils
git-svn-id: trunk@44577 -
2014-04-01 10:24:50 +00:00
bart
596e412566 LazUtils: WinCE use CSIDL_LOCAL to fix compilation error.
git-svn-id: trunk@43693 -
2014-01-11 00:57:27 +00:00
bart
1729ccb7bf LazUtils: yet another attempt to fix compilation for WinCE implementation of GetAppConfigDirUtf8.
git-svn-id: trunk@43692 -
2014-01-11 00:36:02 +00:00
martin
5fcf1178ec Fixed compile on wince. Broken by r43495 #cba214753b (localize special dir)
git-svn-id: trunk@43689 -
2014-01-10 18:21:39 +00:00
bart
e2f0b20bc8 LazUtils: better fix for encoding of string returned by GetAppConfigFileUTF8
(Use WideString variant of GetSpecialDir which retruns UTF8: copy/paste error in r43495 #cba214753b)

git-svn-id: trunk@43611 -
2013-12-29 15:40:16 +00:00
jesus
6ae4e11538 lazutils, fixed encoding of string returned by GetAppConfigFileUTF8 (was ansi, should be utf8)
git-svn-id: trunk@43610 -
2013-12-29 04:28:14 +00:00
bart
cba214753b LazFileUtils: Fix encoding of locale-specific characters in GetAppConfigDirUtf8 and GetAppConfigFileUtf8 on Windows
Issue #0010850.

git-svn-id: trunk@43495 -
2013-11-28 18:37:44 +00:00
mattias
f5dda02fe9 IDE: renamed DoPathDelims to ForcePathDelims
git-svn-id: trunk@42697 -
2013-09-09 10:18:24 +00:00
mattias
773f710bde IDE, codetools, lazutils: Changed DoDirSeparators calls with DoPathDelims calls
git-svn-id: trunk@42674 -
2013-09-08 07:40:06 +00:00
bart
2139b17c5c LazFileUtils: ExpandFilenameUTF8: return unaltered Filename if Filename uses ExtendedLengthPath naming scheme
on Windows.

git-svn-id: trunk@42662 -
2013-09-07 11:20:24 +00:00
paul
f3358d8050 lazutils: fix compilation after cpstrrtl merge
git-svn-id: trunk@42642 -
2013-09-06 14:56:35 +00:00
bart
78fe9ed6eb LazUtils: when seraching for PathDelimiters use AllowDirectorySeparators instead of PathDelim.
Reason: compatibility with fpc RTL.

git-svn-id: trunk@42622 -
2013-09-05 17:55:50 +00:00
bart
05baacd6f0 LazFileUtils: No need for specific FindCloseUtf8 implementation: just use SysUtils.FindClose.
git-svn-id: trunk@42125 -
2013-07-17 21:50:02 +00:00
bart
347f0c2afe LazUtils: move GetFileDescription from FileUtil to LazFileUtils.
Part of moving all UTF8 related filefunctions to LazFileUtils.

git-svn-id: trunk@41903 -
2013-06-26 09:43:12 +00:00
paul
556f193194 components: cleanup
git-svn-id: trunk@41809 -
2013-06-23 10:24:38 +00:00
mattias
822ca4c2e1 LCL: changed INVALID_HANDLE_VALUE from 0 to LCLType.Handle(-1), -1 is the Windows value
git-svn-id: trunk@41517 -
2013-06-03 17:40:58 +00:00
bart
47f5c33813 LazFileUtils: Split some implementations into Windows and Unix specific include files.
git-svn-id: trunk@41451 -
2013-05-29 13:05:12 +00:00
bart
b9a543d619 LazUtils: move more Utf8 file routines to LazFileUtils (and inline them in FileUtil):
CompareFileExt, FileIsExecutable, CheckIfFileIsExecutable, FileIsSymlink, CheckIfFileIsSymlink,
FileIsHardLink, FileIsReadable, FileIsWritable.

git-svn-id: trunk@41358 -
2013-05-22 16:36:57 +00:00
bart
ecc0103303 winlazfileutils.inc: refactoring and adjusting some layout.
git-svn-id: trunk@41349 -
2013-05-22 10:50:29 +00:00
bart
b59ec93c89 LazUtils: move the more UTF8 file routines to LazFileUtils (and inline them in FileUtil):
FindFirstUTF8, FindNextUTF8, FindCloseUTF8, DeleteFileUTF8, RenameFileUTF8,
GetCurrentDirUTF8, SetCurrentDirUTF8, CreateDirUTF8, RemoveDirUTF8,
FilenameIsAbsolute, FilenameIsWinAbsolute and FilenameIsUnixAbsolute.

git-svn-id: trunk@41348 -
2013-05-22 10:24:41 +00:00
bart
3b1ac2f83d LazFileUtils: Add function FileSizeUtf8
git-svn-id: trunk@41294 -
2013-05-19 13:11:41 +00:00
bart
280b9f2060 LazFileUtils: fix FileSetDateUTF8 on Windows when FileName contains unicode
characters outside current codepage.

git-svn-id: trunk@41289 -
2013-05-19 12:52:48 +00:00
bart
486d00d68c LazFileUtils: fix FileAgeUTF8 on Windows when FileName contains unicode
characters outside current codepage.

git-svn-id: trunk@41287 -
2013-05-19 12:37:47 +00:00
bart
43c5ac5e1a LazFileUtils: Fix DirectoryExistsUTF8 on Windows when Directory contains
unicode characters outside current codepage.

git-svn-id: trunk@41285 -
2013-05-19 12:25:06 +00:00
bart
0986ec79fe LazFileUtils: Fix FileExistsUTF8 on Windows when FileName contains uncode
characters outside current codepage.

git-svn-id: trunk@41283 -
2013-05-19 12:17:03 +00:00
bart
503626439e LazFileUtils: fix Windows implementation of FileGetAttrUTF8 and FileSetAttrUTF8 when
filename contains unicode characters outside current codepage.

git-svn-id: trunk@41281 -
2013-05-19 12:03:33 +00:00
bart
1b61e2844c LazFileUtils: Add FileCreateUtf8(Const FileName : String; ShareMode : Integer; Rights : Cardinal) : THandle;
- Refactor code in winlazfileutils for FileCreateUtf8 to remove duplicate code.
- Use Utf8ToSys in the unix implementation.

git-svn-id: trunk@41277 -
2013-05-19 11:11:23 +00:00
bart
bf3f2431f6 LazUtils: fix LazFileUtils.FileIsText when filename has unicode characters outside currrent codepage on Windows.
Needs refactoring of LazUtf8Classes (use LazFileUtils instead of FileUtil).
Next step in moving UTF89 file routines to LazFileUil.

git-svn-id: trunk@41209 -
2013-05-15 16:52:42 +00:00
bart
0ce3f9f9f0 LazFileUtils: rename ExpandDots() to ResolveDots()
git-svn-id: trunk@41084 -
2013-05-09 07:37:51 +00:00
bart
fb55facdaa ExpandFileNameUtf8: expand current drive if FileName = '\' (Windows)
git-svn-id: trunk@41035 -
2013-05-05 11:04:09 +00:00
bart
a53520295e LazUtils: Fix ExpandFileNameUTF8 for directories with Unicode characters outside
current codepage on Windows.
Also do not remove trailing and leading spaces, it is inconsistent with
SysUtils.ExpandFileName.
Start splitting implementation in general, unix and windows specific includefiles.

git-svn-id: trunk@40842 -
2013-04-18 18:23:02 +00:00