Max Kellermann
1e6f5f012c
fs/StandardDirectory: add GetUserRuntimeDir()
2021-10-26 09:30:16 +02:00
Max Kellermann
225d85fd9b
fs/StandardDirectory: use "if" with initializer
2021-10-26 09:29:57 +02:00
Max Kellermann
1bb22f118d
fs/StandardDirectory: add more pure/const attributes
2021-10-26 09:04:20 +02:00
Max Kellermann
f510564d9d
more [[gnu::...]] attributes
2021-10-13 12:07:05 +02:00
Max Kellermann
56997290d7
io/BufferedOutputStream: add method Discard()
2021-08-27 12:06:36 +02:00
Max Kellermann
d2f84f3df8
io/BufferedOutputStream: allow specifying the buffer size
2021-08-27 12:06:20 +02:00
Max Kellermann
9da28e5c73
io/BufferedOutputStream: more API documentation
2021-08-27 12:06:02 +02:00
Max Kellermann
d1f9b06f84
io/BufferedOutputStream: add WriteT()
2021-08-27 12:05:26 +02:00
Max Kellermann
f9f3306db9
io/BufferedOutputStream: use std::size_t
2021-08-27 12:05:06 +02:00
Max Kellermann
19d19cd737
fs/io/BufferedOutputStream: avoid including windows.h
...
Include the most specific header documented by MSDN instead.
2021-08-27 12:04:44 +02:00
Max Kellermann
bd893e6336
release v0.22.10
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmENYHwQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEpGtD/9ToU27x36NAAFpChicSqbu3h2wtJ29lowT
ivV80XB26pQeGK0DSXADSs38MVXo42i3vqg0zGWV9TRbcDs5VErXANVLN16qsKCu
U0v1BDY11UiYp6ATiUjIahyG1UsmbRVZlfDyVIhYvmFpGLFw6+03HH6w2k/v85ns
FxyXkYDYcUokPJPEQcChE1eIwKsGM6MjbdVIkJAEo3wGhL/Hhy2KUskrFcCo1PDj
7xxGrwauG+8wSjAWMA5vzl3udRaDauuXztm5QbQIDdsbRaCiBAdgkzC0PvIxTOr0
bR4WHVB0KSiM96yIXNtg/WZxO0XrxppmX/E4eZSgz0JGKMrAHcoTJAUCIDu3X719
gJnJLg7r2X5dTchXezv09YoJolKbw1bOooyAuE4FCDWMsOa2GRuBZC+8w7DNTZuo
PTh+Z40fnfpNBofe+e/WZrXr6i2TKk8CqHEidq2GHlOkvTR7g6m8MjOLvZNHotMb
9ECr9MhzXH+nvEX8IaxvjWsfLJiDbUgnVsQ+6akGtkbragaDN/Wgr/XdkELoLlsK
LZFY5ngnZmDXOu4tjBLJtfrTkZB2/Hld4xtF1qlsy9fvZBRKeKlpABTLaa8r/vnR
Ta0rB2O3/dculZbHZRUnZvLS4Xv4g322vW9Wso9IBoWRn9fC8b2zR93k7breAqcn
pKbYGg/j6g==
=/954
-----END PGP SIGNATURE-----
Merge tag 'v0.22.10'
release v0.22.10
2021-08-06 18:21:59 +02:00
Max Kellermann
1761fb14af
fs/Traits: add PathTraitsUTF8::IsAbsoluteOrHasScheme()
2021-08-05 20:09:06 +02:00
Max Kellermann
c97aabe43a
Merge branch 'v0.22.x'
2021-08-05 15:17:07 +02:00
Max Kellermann
809a18913a
fs/Traits: add overload GetParent(string_view)
2021-07-16 08:30:34 +02:00
Max Kellermann
6f539cfcd6
Partition, ...: use libfmt for logging
2021-06-24 21:40:11 +02:00
Max Kellermann
96707c0426
release v0.22.7
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAmClOSYQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEkODD/49e950HLmZE8x3rmyeEEsgdvHkOVpPlKHo
+wsmSsi+N0sQKgEOffSYyL0MRWaQqzRMnl1EcEVErCfQl5f1mOw9+TL4f5ZEjVNw
CQFMy1awHtCfktgF5zq6NzXD3nor9mkjiP733x/kGcsxwfk/Y4radqUBKJ5Y4a2B
YSg35a/YTOfLCmb9WBquwAi22x7AkyBzyrY3ToCzynVuaNcT3gvLsAAMFzRUKpqD
QEoCtUxJ4CQayjWjtG/bBCs2TVSmJvovhM2xB4Jnm+MeZz+bKI0y+ALW2Wk0Agnd
qxDqyCEnvHi5pf8i9usl4/A63VDC7HHj9kDSLtPLGTijv+7Wvvr4kNpwm2DuJ4q1
1pOEgT480ryK1FPyO6XnYCk616NqjgMbplr6SQ1DuVpIddWdiGARoge/WiNvsbT9
pnEp0q9V3cQmuJ30LlskMJHAPyrE3KSrO1s+4P2zUeirwnMnOCPdq+gT+lRw4GNG
OqLFEDHaELgSaZxInCN8RCXdLMrpuvKm+FQQApU1KwbYPXIassR14yt6BPpjxqea
vkvFLtpwFWthNPLkujak5rDqAPvbHzAeOfaOiZelzd21nl/1omiMXSXRcJkEjONi
JC5VWJpi1PHMXocq6AcOQT/9XhIH4uDA+Xghn7CURBTB6WoB954TSmuVIjXTfgAv
XQYqRR+7Yw==
=Gtzo
-----END PGP SIGNATURE-----
Merge tag 'v0.22.7'
release v0.22.7
2021-05-19 18:43:19 +02:00
Max Kellermann
bcf0fdd3a8
meson.build: define NOUSER on Windows for lighter windows.h
...
A few exceptions are needed for sources which include COM header
(directly or indirectly).
This fixes lots of shadow warnings, see
https://github.com/MusicPlayerDaemon/MPD/issues/1150
2021-05-19 18:02:49 +02:00
Max Kellermann
c64a3b5dbb
fs/Glob: un-inline the Windows version to reduce header dependencies
2021-05-19 17:41:23 +02:00
Max Kellermann
16c38c438f
fs/Glob: use defaulted move constructor
2021-05-19 17:40:23 +02:00
Max Kellermann
48cc4a6ced
fs/Glob: remove redundant #ifdefs
2021-05-19 17:40:03 +02:00
Max Kellermann
a169a05e41
win32, ...: avoid including windows.h
...
Include the most specific header documented by MSDN instead.
2021-05-19 17:25:32 +02:00
Max Kellermann
dc9103befe
util/AllocatedString: remove Null(), IsNull()
2021-03-04 18:05:29 +01:00
Max Kellermann
cfb7f8ab84
util/AllocatedString: rename to BasicAllocatedString
...
To make things simpler, AllocatedString is now a non-template class.
2021-03-04 18:03:56 +01:00
Max Kellermann
ddd9f20a0b
fs/io/GunzipReader: document that the constructor throws
2021-02-04 17:29:00 +01:00
Max Kellermann
065a0c09f8
fs/io/StdioOutputStream: include cleanup
2021-01-21 21:13:40 +01:00
Max Kellermann
12ff5a547f
fs/io/FileOutputStream: add noexcept
2021-01-21 21:04:19 +01:00
Max Kellermann
3bc45fbf68
util/AllocatedString: remove Null(), IsNull()
2021-01-21 20:12:05 +01:00
Max Kellermann
c70b63c183
util/AllocatedString: rename to BasicAllocatedString
...
To make things simpler, AllocatedString is now a non-template class.
2021-01-21 18:04:03 +01:00
Max Kellermann
5348f8c9c8
copyright year 2021
2021-01-01 19:54:28 +01:00
Max Kellermann
bf97d13d0b
fs/Traits: add GetPathSuffix()
2020-10-28 14:29:46 +01:00
Max Kellermann
6f1a4a73b7
fs/Traits: add GetFilenameSuffix()
2020-10-27 19:14:31 +01:00
Rosen Penev
e4dad42ca1
use std chr functions
...
The ones in std have overloads for const char/char.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-30 13:36:53 +02:00
Max Kellermann
9815d10137
system/FileDescriptor: move to io/
2020-05-05 14:27:03 +02:00
Max Kellermann
97f7270aa8
fs/FileSystem: remove unused function FOpen()
2020-05-05 14:19:29 +02:00
Max Kellermann
0b3acc3eec
release v0.21.23
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl6huEwQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEgcrD/9jLUkiszNc+QWbUGj+RiTaD6fMxA1M8itn
nB7MKI/g/3ggryWMWNhG51O+8wFNs/4PmJJPGxKoU6i6wmS3YFhTAcs0ryilDGAU
1FumnMg/2qIyi2E6K2BMbi0YwZiJhBPWwD4JSt1KGvwPes/qQPFgHAi7ZWhP3tar
fHmgmjwDZ/Kgpl5/Bn7nVNgVuzk/MpBOSwxX9tFtRxqE9wdpm9idve7SVDT7MTvk
vdONWbAe8jXl/A8JHWaUsws0l7fyK5ZKSOXvdeSbzd67I8Rz3aqJMqUh2k/rDuv/
GrDyeEtLV5cXZsL4B3/34kCTKac2ZJmRbSh+buKeDc1Gf0clWnvRMdsMbSoRBY4F
lTWJbjndfq2+iHHBRfaqRjombv52R11yLT+O0aMLEm6l7xPm/rHZXJIcYSmCafd7
FR1qMaVKP5s+M+MqGePxzCUJSWJ+1bjZwjLaHrYXYPUoXSg3mSaeDE5g7BjQhm1E
2Hcfui9lvqR55UNo0NvDBjRT5FBGBUdjF6DjYplUGApw7xFtdahXlEvG7yfyg3ae
pZ3FQ1MZ4dESAw7EhTEBwajsVRQ9DhGQenYTxxCnGVdCucZRPQ9Abhas0U4iFHUA
wGj7j4WKPi+OUSyiT0j4nGuwEVtCkBFv34DqPMLjx8jqtJ8YgCt4iJD4dFwhk1zz
uoQBhq27Gg==
=sR2r
-----END PGP SIGNATURE-----
Merge tag 'v0.21.23'
release v0.21.23
2020-04-23 18:01:23 +02:00
Max Kellermann
fdb28eb0c4
fs/NarrowPath: preserve nullptr in Path operator
...
Fixes Path::IsNull() checks on Windows.
2020-04-23 17:10:28 +02:00
Max Kellermann
f13f66487a
fs/Charset: pass std::string_view to PathToUTF8()
2020-04-08 23:04:37 +02:00
Max Kellermann
0080eee857
fs/Traits: add Relative() overload with std::string_view
2020-04-03 19:45:01 +02:00
Max Kellermann
2429cc8778
fs/Traits: convert first Relative() parameter to std::string_view
2020-04-03 19:29:29 +02:00
Max Kellermann
7a58b8c3e8
fs/AllocatedPath: pass std::string_view to FromUTF8()
2020-04-03 16:21:41 +02:00
Max Kellermann
56b4b010d6
fs/FileSystem, ...: use AllocatedPath::FromFS(string_view)
2020-04-03 16:13:15 +02:00
Max Kellermann
a269fc988b
fs/Charset: enable RVO in FixSeparators()
2020-04-03 16:12:51 +02:00
Max Kellermann
915c48f748
util/AllocatedString: std::string_view support
2020-04-03 16:08:55 +02:00
Max Kellermann
12b97bbe38
release v0.21.22
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl6GCWgQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEvkQD/9qg6cnCgCKSOmTjteJu1ayeXBMDiL3cCCg
AwarHQoxsB0102NpV+MLka+4HIwHn+WNL55TzYgfbSh0nfmnki2fZ0YpsZoQR79w
MP11iMPnFH1oKqj58minBkFNmAis2aLYHJGKaQNUh7wcf0WhbVTqtWBUrKb07RQ0
Zj5lXtg65O/+yaCVdQGS6fMk2t7CqBM+S3RmbXCib/JRMC6aozoC7nWPvj8b2R8d
PgxwKMRzyslyFoxDQZrusDjJ1piyigzUMMr32yzYDED4Xr8jsEELaJfULbr6qWT2
ZNYF91e+D5V7riASAtlFTaVMaISx4QbHjKWR5Xcx0q/SJPAXTxF8RrAqGvqpWYmc
kqmC8iNxQsW5o3sNhI9qg6sOkq2dIu43VasRCvuo19GABR36wwTK5ORoazIi8fbU
/Ki/oZHtZczHRop9Cd6698Qr9jyTPdIs55FbgejzrVADvAmslqtcA6XxCBuG1nSF
Qo48dp9Px7J74qNNuDt5/xLnQGJKaW60/BXrMK9G9QG4x9r4zuCayDO6Qc7FMWWR
DG7k9nYoXJU5YG7xp9Rk+Yj3Ade8kqhTnKfqw0f2JfkLt0ChPG+rZcxICWSdzZm0
AfHxuEQlwKaaFHFEsZhVehlsXkeU9OVywo+QDzmY2uqQ2ddlBZ47Qm2MWgTsv8i/
euVsrzLtag==
=EedX
-----END PGP SIGNATURE-----
Merge tag 'v0.21.22'
release v0.21.22
2020-04-02 18:02:10 +02:00
Max Kellermann
afe2aaa5f6
fs/io/GzipOutputStream: increase buffer size to 16 kB
...
Reduce I/O overhead.
2020-04-02 17:17:58 +02:00
Max Kellermann
9b11caa0e6
fs/io/BufferedReader: larger default buffer (4 kB -> 16 kB)
...
Reduce I/O overhead.
2020-04-02 17:17:27 +02:00
Max Kellermann
4d453a8313
fs/NarrowPath: add class FromNarrowPath
...
Move code from ParseCommandLine().
2020-04-02 17:15:34 +02:00
Max Kellermann
61d7b436a2
fs/NarrowPath: un-inline Windows constructor
2020-04-02 16:27:44 +02:00
Max Kellermann
9c3e1d450a
fs/io/GunzipReader: increase buffer size to 64 kB
...
Reduces I/O overhead while reading a compressed database file.
2020-03-31 15:07:39 +02:00
Rosen Penev
ba3ff10ccd
remove false ifdef
...
The entire section falls under the else path of #ifdef _WIN32. Checking
for it makes no sense. Probably some refactoring mistake.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-20 17:56:33 -07:00
Rosen Penev
7fe49cf24d
[clang-tidy] use default member init
...
Found with modernize-use-default-member-init
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-19 13:38:40 +01:00
Rosen Penev
97425d56e7
remove gcc_unused
...
[[maybe_unused]] (introduced in C++17) is standard C++.
https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused
says that this is equivalent to the GNU unused attribute.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:21 -07:00
Max Kellermann
45b60b3d38
fs/Traits: GetParent() returns std::string_view
2020-03-13 20:01:10 +01:00
Max Kellermann
a885bdba4c
fs/Traits: pass string_view to Build()
2020-03-13 19:55:28 +01:00
Max Kellermann
b6b15afb5a
fs/Path: make constructor explicit
2020-03-13 19:55:25 +01:00
Max Kellermann
1d560c8f0f
fs/AllocatedPath: add string_view
constructor
2020-03-13 19:46:29 +01:00
Max Kellermann
189f6eaa6f
fs/Traits: add string_view
2020-03-13 19:43:39 +01:00
Max Kellermann
87f78b9c39
fs/Traits: use {} notation for return values
2020-03-13 19:43:23 +01:00
Max Kellermann
aa722bd8ac
fs/Traits: use auto
2020-03-13 19:43:23 +01:00
Max Kellermann
58c7ec07a4
fs: use using
instead of typedef
2020-03-13 19:43:23 +01:00
Rosen Penev
a2f5a63bbc
replace stdint.h with cstdint
...
The former is deprecated by C++14. The standard says they are the same:
The header defines all types and macros the same as the C standard library
header<stdint.h>.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 19:04:39 -07:00
Rosen Penev
2db8bcc353
replace stddef.h with cstddef
...
The former is deprecated with C++14. The standard says both are the same:
The contents and meaning of the header<cstddef>are the same as the C
standard library header<stddef.h>,except that it does not declare the type
wchar_t, that it also declares the type byte and its associated
operations (21.2.5), and as noted in 21.2.3 and 21.2.4.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 19:04:38 -07:00
Rosen Penev
c846ee0d1b
replace stdarg.h with cstdarg
...
The former was deprecated in C++14. The Standard says they are the same:
The contents of the header<cstdarg>are the same as the C standard library
header<stdarg.h>, with the following changes: The restrictions that ISO C
places on the second parameter to the va_start macro in header<stdarg.h>
are different in this International Standard. The parameter parmN is the
rightmost parameter in the variable parameter list of the function
definition (the one just before the...).219If the parameter parmN is a
pack expansion (17.5.3) or an entity resulting from a lambda capture
(8.1.5), the program is ill-formed, no diagnostic required. If the
parameter parmN is of a reference type, or of a type that is not
compatible with the type that results when passing an argument for which
there is no parameter, the behavior is undefined.
Also changed va_list to the std:: namespace version, which is the same.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 19:03:12 -07:00
Rosen Penev
4b57b7f5a5
replace limits.h with climits
...
The former was deprecated with C++14. The standard says they are the same
with one exception:
The header<climits>defines all macros the same as the C standard library
header<limits.h>.
[Note:The types of the constants defined by macros in<climits>are not
required to match the types to which themacros refer.— end note]
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 16:14:04 -07:00
Rosen Penev
edc4989d9c
change errno.h to cerrno
...
The former is deprecated by C++14. It's also functionally the same.
From the standard:
19.4
The header<cerrno>is described in Table 43. Its contents are the same as
the POSIX header<errno.h>,except that errno shall be defined as a macro.
[Note: The intent is to remain in close alignment with the POSIX
standard.] A separate errno value shall be provided for each thread.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:51:16 -07:00
Rosen Penev
ab9f5d2067
replace assert.h with cassert
...
The former was deprecated with C++14.
According to the C++11 and C++17 standards, both files are identical.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-12 15:25:38 -07:00
Max Kellermann
01632d37ef
Merge branch 'v0.21.x'
2020-03-12 08:11:08 +01:00
Max Kellermann
b7ce452308
fs/Traits: add IsSpecialFilename()
...
Merge some duplicate code in a central library.
2020-03-07 09:30:56 +01:00
Max Kellermann
72ec641f0d
*: use auto
2020-02-01 14:02:43 +01:00
Rosen Penev
b64fdae938
[clang-tidy] use override instead of virtual
...
Found with modernize-use-override
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-01-31 21:27:26 -08:00
Max Kellermann
7551867249
meson.build: move Log.cxx and LogBackend.cxx into a static library
...
Prevents compiling those sources many times, once for each debug
program using it.
2020-01-18 19:56:16 +01:00
Max Kellermann
2817bf9e95
copyright year 2020
2020-01-18 19:23:49 +01:00
Max Kellermann
4937d77cb6
util/{Const,Writable}Buffer: drop "_type" from type names
...
Behave like STL.
2020-01-03 15:55:06 +01:00
Max Kellermann
b449627265
fs/io/Reader: relicense to BSD-2
2019-12-16 17:13:55 +01:00
Max Kellermann
ed327c597a
lib/icu/Converter: Create() returns std::unique_ptr
2019-11-04 15:44:06 +01:00
Max Kellermann
1bfede120a
fs/Traits: call std::string::reserve() in BuildPathImpl()
2019-09-04 12:01:25 +02:00
Max Kellermann
f909615b14
include cleanups (powered by iwyu)
2019-08-15 17:57:20 +02:00
Max Kellermann
cde6c46d2f
util/Macros: replace with std::size() (C++17)
2019-08-03 13:10:49 +02:00
Max Kellermann
d663f81420
include cleanups (powered by iwyu)
2019-07-05 09:59:58 +02:00
Max Kellermann
a139279575
Copyright year 2019
2019-06-17 11:17:30 +02:00
Max Kellermann
bd6b7aa88e
archive/Lookup: move to fs/LookupFile.cxx
...
This can be used for other purposes as well.
2019-06-15 14:26:26 +02:00
Max Kellermann
476647bfa0
fs/AllocatedPath: add GetSuffix()
2019-06-15 13:57:16 +02:00
Max Kellermann
3e3ee581a8
fs/Path: add constexpr
2019-05-31 19:47:50 +02:00
Max Kellermann
5641c4baa6
system/Clock, fs/FileInfo: move FILETIME specific code to time/FileTime.hxx
2019-05-08 16:02:13 +02:00
Max Kellermann
afdaaba045
fs/io/BufferedOutputStream: add noexcept
2019-04-26 14:55:00 +02:00
Max Kellermann
1cfc0cb874
fs/io/AutoGunzipReader: use std::unique_ptr<>
2019-04-26 14:55:00 +02:00
Max Kellermann
3882c97545
fs/io/AutoGunzipReader: add noexcept
2019-04-26 14:55:00 +02:00
Max Kellermann
bf9f690c70
fs/io/GunzipReader: add noexcept
2019-04-26 14:55:00 +02:00
Max Kellermann
392b783c9e
fs/io/TextFile: add noexcept
2019-04-26 14:44:27 +02:00
Max Kellermann
6d86902a02
fs/io/TextFile: use std::unique_ptr<>
2019-04-26 14:42:54 +02:00
Max Kellermann
1415bac1d6
fs/AllocatedPath: add Android-only FromUTF8(std::string&&) overload
2019-04-24 14:39:47 +02:00
Max Kellermann
7a98a784b2
fs/Features: add macro FS_CHARSET_ALWAYS_UTF8
2019-04-24 14:28:55 +02:00
Max Kellermann
162845cc6d
fs/Charset: move HAVE_FS_CHARSET to Features.hxx
2019-04-24 14:24:54 +02:00
Max Kellermann
a8ee7269bc
fs/Config: add noexcept
2019-04-24 14:24:21 +02:00
Max Kellermann
7c1843ee2e
fs/AllocatedPath: add noexcept
2019-04-24 14:18:24 +02:00
Max Kellermann
bc8bb41aef
fs/Path: add noexcept
2019-04-24 14:17:37 +02:00
Max Kellermann
a8b94a4507
fs/Traits: add noexcept
2019-04-24 14:16:45 +02:00
Max Kellermann
16906cdcbe
fs/FileInfo: remove redundant inline
keywords from constexpr
functions
2019-03-12 11:54:31 +01:00
Max Kellermann
da4bb4c298
fs/io/OutputStream: update include guard
2019-02-19 12:39:29 +01:00
Max Kellermann
5b8ff61799
fs/io/BufferedOutputStream: add WithBufferedOutputStream()
2019-02-19 12:37:53 +01:00