Commit Graph

124 Commits

Author SHA1 Message Date
bart
555ede86aa LazUtils: Move SysErrorMessageUTF8 to LazUtf8 (and inline it in FileUtil).
Part of the ongoing restructuring of LazUtils.

git-svn-id: trunk@41588 -
2013-06-08 14:54:15 +00:00
bart
bcea8662ff LazUtils: Move ConsoleToUTF8, UTF8ToConsole, ParamStrUTF8,
GetEnvironmentStringUTF8 and GetEnvironmentVariableUTF8 to LazUtf8 (and inline them in FileUtil).
Part of the ongoing restructuring of LazUtils.

git-svn-id: trunk@41587 -
2013-06-08 14:41:16 +00:00
bart
8df292bbb6 LazUtils: Move FileSearchUtf8 to LazFileUtils (and inline it in FileUtil).
Part of the ongoing restructuring of LazFileUtils/FileUtil.

git-svn-id: trunk@41568 -
2013-06-06 21:29:50 +00:00
bart
9cab951c18 LazUtils: Move FileIsReadOnly to LazFileUtils (and inline it in FileUtil).
Part of the ongoing restructuring of LazFileUtils/FileUtil.

git-svn-id: trunk@41566 -
2013-06-06 21:22:21 +00:00
mattias
4e6e36dc04 lazutils: sort uses clause
git-svn-id: trunk@41488 -
2013-06-02 08:32:06 +00:00
bart
27e955ca5c FileUtil: Implement WideString API based version of ParamStrUtf8 on Windows.
git-svn-id: trunk@41486 -
2013-06-01 18:01:02 +00:00
bart
1d2d0b6a26 LazFileUtils: (Try)CreateRelativePath: implement option to control wether Dest and Source
must always share a common base folder (being not the root directory).
For CreateRelativePath it defaults to True for backwards compatibility.

git-svn-id: trunk@41452 -
2013-05-29 19:01:13 +00:00
bart
a74716e6aa LazFileUtils: Fix CreateRelativePath function. Better fix for issue #0022603.
git-svn-id: trunk@41449 -
2013-05-29 11:51:48 +00:00
juha
ecd140c985 Improve license headers in sources, part 2. Refer to details about license, not copyright. Remove jargon about lack of warranty, it is covered in license already.
git-svn-id: trunk@41389 -
2013-05-25 09:22:25 +00:00
bart
42315809a3 LazUtils: move more Utf8 file routines to LazFileUtils (and inline them in FileUtil):
ForceDirectoriesUTF8.

git-svn-id: trunk@41374 -
2013-05-23 17:26:47 +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
cb33ec967a LazUtils: move more Utf8 file routines to LazFileUtils (and inline them in FileUtil):
ForceDirectory, DirectoryIsWritable.

git-svn-id: trunk@41356 -
2013-05-22 15:38:48 +00:00
bart
ba38848714 LazUtils: move more Utf8 file routines to LazFileUtils (and inline them in FileUtil):
DirPathExists, CompareFilenames, CompareFilenamesIgnoreCase.

git-svn-id: trunk@41354 -
2013-05-22 15:14:35 +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
a9b26cc418 FileUtil: inline ChompPathDelim to LazFileUtils.ChompPathDelim.
git-svn-id: trunk@41324 -
2013-05-20 13:24:19 +00:00
bart
c990f3d7c8 FileUtil: inline AppendPathDelim, TrimFilename, CleanAndExpandFilename and CleanAndExpandDirectory
to their LazFileUtils couterparts.

git-svn-id: trunk@41297 -
2013-05-19 14:08:07 +00:00
bart
ef3320295a FileUtil: inline FileSize to LazFileUtils.FileSizeUtf8.
git-svn-id: trunk@41295 -
2013-05-19 13:15:30 +00:00
bart
bdec439cd2 FileUtil: inline FileSetDateUTF8 to use LazFileUtils.FileSetDateUTF8.
git-svn-id: trunk@41290 -
2013-05-19 12:56:41 +00:00
bart
d1e6e77a05 LazFileUtils: inline FileAgeUTF8 to LazFileUtils.FileAgeUTF8
git-svn-id: trunk@41288 -
2013-05-19 12:43:01 +00:00
bart
946e76d280 FileUtil: inline DirectoryExistsUTF8 to LazFileutils.DirectoryExistsUTF8.
git-svn-id: trunk@41286 -
2013-05-19 12:28:41 +00:00
bart
f813d88848 FileUtil: inline FileExistsUTF8 to use LazFileUtils.FileExistsUTF8.
git-svn-id: trunk@41284 -
2013-05-19 12:21:16 +00:00
bart
0a3ee817e7 FileUtil: inline FileGetAttrUTF8 and FileSetAttrUTF8 to their LazFileUtils counterparts.
git-svn-id: trunk@41282 -
2013-05-19 12:11:27 +00:00
bart
da816b1721 FileUtil: inline NeedRTLAnsi, SetNeedRTLAnsi, UTF8ToSys ans UTF8ToAnsi to use their LazuUtf8 counterparts.
git-svn-id: trunk@41280 -
2013-05-19 11:43:06 +00:00
bart
cba0395125 FileUtil: inline FileOpenUTF8, FileCreateUTF8 and FileCreateUTF8 to their LazFileUtils counterparts.
Next step in moving UTF8 file routines to LazFileUtils.

git-svn-id: trunk@41211 -
2013-05-15 17:14:24 +00:00
bart
f77efa70a9 FileUtil: inline FileIsText to LazFileUtils.FileIsText.
Next step in moving UTF8 file routines to LazFileUtils.

git-svn-id: trunk@41210 -
2013-05-15 17:03:11 +00:00
mattias
8e652015ad lazutils; fixed compilation under unix
git-svn-id: trunk@41160 -
2013-05-12 18:20:15 +00:00
bart
d219baae5f FileUtil: DeleteDirectory: also delete symlinks in a directory on *nix (don't follow them). Issue #0024415.
git-svn-id: trunk@41159 -
2013-05-12 18:15:48 +00:00
juha
bdba8f2a01 One more "inherited Create;" to be sure.
git-svn-id: trunk@41097 -
2013-05-09 15:37:10 +00:00
juha
8ddfe52d9b Add "inherited Create;" to constructors for classes derived from TFileSearcher.
git-svn-id: trunk@41089 -
2013-05-09 11:52:17 +00:00
bart
a031882b1a FileUtil: inline ExpandFileNameUTF8 as LazFileUtils.ExpandFileNameUTF8,
which has better handling of unicode characters on Windows.
(One step in the moving of UTF8 related filefunctions to LazFileUtils)

git-svn-id: trunk@41038 -
2013-05-05 11:40:45 +00:00
bart
0baf6d6df0 CreateRelativePath (FileUtil and LazFileUtils): use SysUtilsExtractRelativePath inernally.
Fixes issue #0022603.

git-svn-id: trunk@41036 -
2013-05-05 11:20:44 +00:00
bart
0631e9d7d1 TFileSearcher: Implement OnDirectoryEnter event.
git-svn-id: trunk@41032 -
2013-05-04 21:52:55 +00:00
bart
f84bed8662 TFileSearcher: Implement FileAttribute and DirectoryAttribute properties to let user control
what files and directories are searched. Fixes issue #0024369.

git-svn-id: trunk@41031 -
2013-05-04 21:41:00 +00:00
mattias
33e67992e5 lazutils: fixed TListFileSearcher.Create
git-svn-id: trunk@40996 -
2013-05-02 11:23:26 +00:00
bart
5fcdbd6c7d TFileSearcher.Search: use Windows specific file pattern matching on Windows.
Fixes issue #0024306

git-svn-id: trunk@40973 -
2013-05-01 11:03:12 +00:00
juha
48f88c37ef Revert "Use AllFilesMask everywhere instead of GetAllFilesMask, mask must be fixed in FPC libs"
git-svn-id: trunk@40957 -
2013-04-30 16:35:02 +00:00
bart
d479775c9d TFileSearcher: allow case-sensitive file searching (defaults to false).
git-svn-id: trunk@40902 -
2013-04-27 17:22:51 +00:00
juha
518250f92c LazUtils: Test for '*.*' instead of AllFilesMask in TFileSearcher
git-svn-id: trunk@40877 -
2013-04-22 10:09:43 +00:00
juha
07d79d2536 LazUtils: Make TFileSearcher match all files with *.* on Windows like FindFirst + FindNext do. Issue #24306
git-svn-id: trunk@40873 -
2013-04-22 07:59:02 +00:00
juha
140ce5d69d LazUtils: move GetAllFilesMask's deprecated note to correct place.
git-svn-id: trunk@40850 -
2013-04-19 08:36:40 +00:00
juha
73fb9ab0e2 Use AllFilesMask everywhere instead of GetAllFilesMask
git-svn-id: trunk@40849 -
2013-04-19 07:08:03 +00:00
juha
bb419695bb LazUtils: Add FollowSymLink property to TFileSearcher. Issue #24291, modified from Mario Bonati's patch
git-svn-id: trunk@40848 -
2013-04-19 07:05:25 +00:00
juha
378844986e LazUtils: Handle a temporarily non-accessible file in CopyFile function. Issue #24162, patch from Cyrax
git-svn-id: trunk@40828 -
2013-04-16 07:50:07 +00:00
bart
809f049924 LazUtils: fix FileSetDateUtf8 for Windows, when file is in a folder with Unicode characters.
Fixes issue: #0023696. Patch based upon efforts of Takeda Matsuki.

git-svn-id: trunk@39893 -
2013-01-19 17:23:30 +00:00
bart
3e31ff5eeb LazUtils: fix FileAgeUtf8 for Windows, when file is in a folder with Unicode characters.
Fixes issue: #0023538. Patch by Takeda Matsuki.

git-svn-id: trunk@39891 -
2013-01-19 15:37:06 +00:00
mattias
5bcaa75c06 lazutils: moved SplitCmdLineParms to LazFileUtils
git-svn-id: trunk@39741 -
2013-01-03 12:10:48 +00:00
mattias
899bdb7156 lazutils: FileUtil: added SplitCmdLineParams
git-svn-id: trunk@39730 -
2013-01-02 12:43:12 +00:00
juha
b51b639fab LazUtils: reimplement the test for faDirectory in TFileSearcher.Search. FindFirst returns files in any case.
git-svn-id: trunk@39312 -
2012-11-19 21:51:07 +00:00
juha
95686848e3 LazUtils: Clean the TFileSearcher.Search code and use faDirectory for pure dir search
git-svn-id: trunk@39297 -
2012-11-18 11:41:41 +00:00
mattias
fad8217990 lazutils: fileutil: less dependencies
git-svn-id: trunk@38844 -
2012-09-26 10:35:16 +00:00
maxim
9a487a2e50 LazUtils: improve unicode path/filename handling by Fileutil.ReadFileToString, patch from Takeda Matsuki, bug #22953
git-svn-id: trunk@38816 -
2012-09-24 20:32:19 +00:00
juha
995b5a3d55 Use a record of signed SmallInts to prevent range check errors. Still about issue #22760
git-svn-id: trunk@38476 -
2012-09-02 00:32:29 +00:00
juha
9b6e54b588 Revert r38465 #f26e63161d and use typecasts to prevent range errors. Should fix issue #22760
git-svn-id: trunk@38469 -
2012-08-31 22:38:46 +00:00
mattias
3e69cb14b1 lazutils: GetAppConfigDirUTF8, GetAppConfigFileUTF8: added parameter to automatically create the directory
git-svn-id: trunk@37803 -
2012-06-27 16:25:51 +00:00
sekelsenmat
6a3242c27d Patch from bug #21984: Improves FileSetDataUTF8
git-svn-id: trunk@37794 -
2012-06-27 07:06:57 +00:00
martin
13192356d4 Use Utf8CompareText instead of AnsiCompare
git-svn-id: trunk@37772 -
2012-06-24 22:32:51 +00:00
martin
8b57f2995c Use Utf8CompareText instead of AnsiCompare
git-svn-id: trunk@37760 -
2012-06-24 14:57:26 +00:00
juha
68d9311e48 LazUtils: Change CopyFile's behavior to match the earlier version. Issue #22259, patch from Mario Bonati
git-svn-id: trunk@37641 -
2012-06-13 19:37:09 +00:00
juha
b53fa296e3 LazUtils: add a ToDo item for CopyDirTree.
git-svn-id: trunk@37216 -
2012-05-07 21:11:03 +00:00
juha
4df518b70e LazUtils: minor refactoring of CopyFile
git-svn-id: trunk@37110 -
2012-04-30 17:15:23 +00:00
juha
4507911224 LazUtils: Improve CopyDirTree, modified from a patch from Takeda Matsuki.
git-svn-id: trunk@37109 -
2012-04-30 17:15:13 +00:00
juha
afcd11631a LazUtils: Make ForceDirectoriesUTF8 more readable.
git-svn-id: trunk@37108 -
2012-04-30 17:15:01 +00:00
juha
508a264326 LazUtils: prepare for creating destination path in CopyDirTree differently
git-svn-id: trunk@37074 -
2012-04-29 09:30:59 +00:00
juha
420bad1485 LazUtils: Implement function CopyDirTree. Issue #21875, modified from patch from Takeda Matsuki
git-svn-id: trunk@37072 -
2012-04-29 08:38:36 +00:00
juha
5fd04a633b LazUtils: fix spelling from Childs to Children
git-svn-id: trunk@37061 -
2012-04-28 13:02:13 +00:00
juha
9fcb610a8e LazUtils: control how CopyFile works using flags. Issue #21854, modified from a patch from Takeda Matsuki
git-svn-id: trunk@37060 -
2012-04-28 13:02:07 +00:00
juha
c53c098c48 LazUtils: Remove useless comments (func declaration is copied to comment) + formatting
git-svn-id: trunk@37059 -
2012-04-28 13:01:59 +00:00
juha
d7cb4f1717 LazUtils: Fix FileUtil.CopyFile to work with Unicode in filenames. Issue #21817, patch from Takeda Matsuki
git-svn-id: trunk@37018 -
2012-04-24 21:47:32 +00:00
mattias
1a57c31210 lazutils: revert
git-svn-id: trunk@35425 -
2012-02-17 15:40:12 +00:00
mattias
4fdb9ca1a2 lazutils: merged some duplicates
git-svn-id: trunk@35424 -
2012-02-17 15:22:24 +00:00
sekelsenmat
8b380e202e Fixes bug #20229: ExpandFileNameUTF8, ExpandUNCFileNameUTF8 or other UTF8 functions in FileUtil
git-svn-id: trunk@33000 -
2011-10-20 20:43:24 +00:00
juha
dc810cd394 LazUtils: Add SearchSubDirs parameter to FindAllDirectories.
git-svn-id: trunk@32989 -
2011-10-19 21:20:26 +00:00
juha
3604a5e097 LazUtils: Fix FindAllDirectories to find subdirs, too.
git-svn-id: trunk@32954 -
2011-10-18 11:26:23 +00:00
sekelsenmat
13daaaa219 Makes LazUtils a base package for the LCL and moves FileUtil, Masks and lazutf8classes to it. Updates the Makefile structure to reflect this.
git-svn-id: trunk@32936 -
2011-10-17 09:24:01 +00:00