Max Kellermann
8fe004e98e
fs/Charset: use "UTF-8" instead of "utf-8" as the default value
...
The upper-case name seems to be the canonical one.
2014-02-23 22:03:40 +01:00
Max Kellermann
1709ab6810
fs/TextFile: use custom allocation instead of GString
2014-02-17 23:04:10 +01:00
Max Kellermann
ce925ba56f
fs/Charset: disable if GLib is disabled
2014-02-17 22:48:26 +01:00
Max Kellermann
ec8873b178
Mapper: move check_directory() to the filesystem library
2014-02-07 23:25:47 +01:00
Max Kellermann
d744c997d8
fs/Traits: add function Relative()
...
Move code from Path::RelativeFS() and make it generic.
2014-02-07 19:08:51 +01:00
Max Kellermann
c310941f69
fs/AllocatedPath: add conversion constructor from Path
2014-01-30 23:36:57 +01:00
Max Kellermann
c02f146791
fs/DirectoryReader: GetEntry() returns Path, not AllocatedPath
...
Reduce overhead, don't duplicate the string.
2014-01-30 22:20:57 +01:00
Max Kellermann
0bd01824f6
fs/AllocatedPath: add Build() overlays with Path arguments
2014-01-30 22:15:13 +01:00
Max Kellermann
197b503f3e
Config*: move to config/
2014-01-24 00:20:01 +01:00
Max Kellermann
4f83c60296
copyright year 2014
2014-01-13 22:31:55 +01:00
Denis Krjuchkov
5d85792178
fs: implemented standard directories API
2013-12-08 17:24:43 +06:00
Denis Krjuchkov
acba9c0f61
TextFile: move to fs subsystem
2013-12-08 04:15:27 +06:00
Denis Krjuchkov
38afc89407
fs/FileSystem.hxx: don't define CheckAccess() with mode on Windows
2013-12-05 15:05:01 +06:00
Denis Krjuchkov
06d7169674
fs/FileSystem.hxx: add CheckAccess without mode parameter
2013-12-05 15:05:01 +06:00
Denis Krjuchkov
8bf1640932
fs/Traits.cxx: don't return drive path without trailing separator
2013-12-05 15:05:01 +06:00
Denis Krjuchkov
da50c888fe
fs/Traits.hxx: introduce PathTraitsXXX::IsDrive function
2013-12-05 15:05:01 +06:00
Denis Krjuchkov
62dc8e4131
fs/Charset.cxx: replace \ with / when converting path to UTF-8 on Windows
2013-12-05 15:04:52 +06:00
Denis Krjuchkov
cbb9149a82
fs/Traits.hxx: add shorter forms of PathTraitsXXX::Build()
2013-12-05 12:35:28 +06:00
Denis Krjuchkov
dab7348da8
fs/Traits.hxx: add PathTraitsUTF8::GetLength for consistency
2013-12-05 12:35:28 +06:00
Denis Krjuchkov
378e8a6224
fs/AllocatedPath.cxx: don't use g_path_get_dirname
2013-12-05 12:35:28 +06:00
Denis Krjuchkov
289fdcc52b
fs/Traits: implement GetBase/GetParent/Build using templates
2013-12-05 12:35:21 +06:00
Denis Krjuchkov
83e6e3e31f
fs/Traits.cxx: don't return empty string if parent dir is root
2013-12-05 12:27:31 +06:00
Denis Krjuchkov
c387031252
fs/Traits.hxx: add FindLastSeparator function to PathTraitsXXX
2013-12-05 04:09:07 +06:00
Denis Krjuchkov
403bd77eff
fs/Traits: improve compatibility between PathTraitsFS and PathTraitsUTF8
2013-12-05 04:01:29 +06:00
Denis Krjuchkov
b397c46184
fs/Traits.hxx: add gcc_nonnull_all where applicable
2013-12-05 03:56:51 +06:00
Denis Krjuchkov
0a6c4c31b2
fs/Traits: split PathTraits type into PathTraitsFS and PathTraitsUTF8
2013-12-05 03:53:43 +06:00
Denis Krjuchkov
55ed7bd34d
AllocatedPath.hxx: use move constructor
2013-12-03 14:57:26 +06:00
Denis Krjuchkov
eeeef3eab5
fs/AllocatedPath: use PathTraits::BuildFS
2013-12-03 13:50:50 +06:00
Denis Krjuchkov
96413b1604
fs/Traits.hxx: implement BuildFS() method
2013-12-03 13:46:05 +06:00
Denis Krjuchkov
2278fe42e5
fs/Traits.hxx: move definition of AllocatedPath::string to PathTraits
2013-12-03 13:37:35 +06:00
Denis Krjuchkov
3a183f869f
fs/Traits.hxx: add GetLengthFS()
...
There is no GetLengthUTF8() because strlen or std::string::size()
could be used instead.
2013-12-03 12:26:05 +06:00
Denis Krjuchkov
6c5828822c
fs/AllocatedPath.hxx: add FromFS(std::string) method
2013-12-03 12:16:53 +06:00
Denis Krjuchkov
9dd824ba50
fs/Traits.hxx: don't use g_path_is_absolute
2013-12-03 11:59:57 +06:00
Denis Krjuchkov
d744ea3fca
fs/Traits.hxx: simplify code
...
- Move definition of SEPARATOR_UTF8 out of #ifdef
- Remove duplicated check in IsSeparatorUTF8
2013-12-03 11:48:45 +06:00
Max Kellermann
f90abe9530
include cleanup using iwyu
2013-11-28 11:50:54 +01:00
Max Kellermann
20597b3632
*: use nullptr instead of NULL
2013-10-28 23:58:17 +01:00
Max Kellermann
83c726a34f
GetBaseUTF8
2013-10-21 10:50:22 +02:00
Max Kellermann
93068f10ec
fs/AllocatedPath: don't include glib.h
2013-10-21 10:27:14 +02:00
Max Kellermann
abfbd55305
fs/Path: rename to AllocatedPath
...
The new class Path only holds a string pointer without being
responsible for allocation/deallocation. The FileSystem.hxx library
accepts Path arguments instead of AllocatedPath, to avoid forcing
callers to allocate another string object.
2013-10-17 23:43:46 +02:00
Max Kellermann
b3611524f4
fs/Path: move definitions to struct PathTraits
2013-10-17 23:23:25 +02:00
Max Kellermann
a63613dba0
fs/Path: include clenaup
2013-10-17 23:20:26 +02:00
Max Kellermann
7fec2b02d4
fs/Charset: GetFSCharset() returns "utf-8" by default
...
If fs_charset is empty, i.e. we're using the default "utf-8",
GetFSCharset() should return exactly that instead of an empty
std::string.
2013-10-17 22:47:09 +02:00
Max Kellermann
608a98c873
fs/Charset: default filesystem charset is UTF-8
...
Implement a fast path for UTF-8 which leaves fs_charset empty, and
don't assign a value to fs_charset if there's no configuration.
2013-10-17 22:42:22 +02:00
Max Kellermann
f951e5356b
fs/Charset: don't allow nullptr arguments
2013-10-17 22:39:06 +02:00
Max Kellermann
080ee87e07
fs/Path: move configuration code to Config.cxx
2013-10-17 22:29:03 +02:00
Max Kellermann
fa60b9ae94
fs/Path: move path_domain to Domain.hxx
2013-10-17 22:20:53 +02:00
Max Kellermann
0d33ae52c6
fs/Path: make fs_charset static
2013-10-17 22:10:27 +02:00
Max Kellermann
77e4b28092
fs/Path: include cleanup
2013-10-17 22:08:57 +02:00
Max Kellermann
4817437d31
fs/Limits: convert macro to "constexpr"
2013-10-17 22:08:56 +02:00
Max Kellermann
354b5a9365
fs/Path: move MPD_PATH_MAX to Limits.hxx
2013-10-17 22:00:01 +02:00