Commit Graph

370 Commits

Author SHA1 Message Date
Max Kellermann cd35271698 fs/io/BufferedOutputStream: add code comments 2015-03-23 22:03:25 +01:00
Max Kellermann b31d171ae8 *: doxygen fixups 2015-03-17 11:21:43 +01:00
Max Kellermann 65ff72cdf8 fs/Traits: enable _UNICODE on Windows
Use wchar_t for everything on Windows.  Solves a lot of filesystem
charset problems.
2015-03-05 10:15:10 +01:00
Max Kellermann 983078992d fs/NarrowPath: new utility class 2015-03-05 10:07:07 +01:00
Max Kellermann 2f41eba100 fs/Path: reimplement GetSuffix() using GetBase() and StringFindLast() 2015-03-05 10:07:07 +01:00
Max Kellermann 830a1bd130 fs/File{System,Info}: fix regular file check
Don't use FILE_ATTRIBUTE_NORMAL, it's a "magic" value for something
else.  To check if a file is a regular file, we need to check if it's
NOT a directory (or a device).
2015-03-05 10:07:07 +01:00
Max Kellermann 5c5ea8a254 fs/Path: use the "const_pointer" typedef 2015-03-05 10:07:07 +01:00
Max Kellermann 6887d5d347 fs/Traits: use TCHAR on Windows 2015-03-05 08:58:04 +01:00
Max Kellermann 39c9669445 fs/Traits: add macro PATH_LITERAL() 2015-03-05 08:58:04 +01:00
Max Kellermann 44565e22a0 fs/Traits: use string.h API wrappers 2015-03-05 08:58:04 +01:00
Max Kellermann cd08e5c7da fs/io/FileOutputStream: use class FileDescriptor 2015-03-03 23:04:25 +01:00
Max Kellermann 57ad3aca8e input/file: use class FileReader 2015-03-03 21:48:45 +01:00
Max Kellermann a5760670ef fs/io/FileReader: add method GetFileInfo() 2015-03-03 21:41:11 +01:00
Max Kellermann f04a3ec201 fs/io/FileReader: add move constructor 2015-03-03 21:41:10 +01:00
Max Kellermann 40a587bbaf system/FileDescriptor: new wrapper class for a file descriptor 2015-03-03 17:14:30 +01:00
Max Kellermann dd5daa0767 fs/io/FileReader: add method Seek() 2015-03-03 14:29:36 +01:00
Max Kellermann b0983e8708 fs/Traits: add Find() 2015-03-03 12:44:07 +01:00
Max Kellermann dfcfeeb550 fs/Traits: use std::char_traits 2015-03-03 12:28:47 +01:00
Max Kellermann 87a8a3e22f PlaylistFile: move memchr() call to class Path 2015-03-02 21:48:37 +01:00
Max Kellermann 7ce96585f5 fs/Path: add method GetSuffix()
Type-safe wrapper for uri_get_suffix().
2015-03-01 01:09:53 +01:00
Max Kellermann 0e00b9009d fs/Path: pass Path to Relative() 2015-02-28 23:45:16 +01:00
Max Kellermann a6dd998d31 fs/AllocatedPath: use PathTraitsFS::Relative()
Eliminate duplicate code.
2015-02-28 23:30:53 +01:00
Max Kellermann cdd0ccc67a fs/Path: rename RelativeFS() to Relative() 2015-02-28 23:19:34 +01:00
Max Kellermann a918821868 fs/Traits: add missing dereference in RelativePathImpl() 2015-02-28 23:19:34 +01:00
Max Kellermann f4f21f462d fs/CheckFile: convert path to UTF-8 for error message 2015-02-28 23:00:26 +01:00
Max Kellermann d09b8b5bd7 fs/FileInfo: use GetFileAttributesEx() on WIN32 2015-02-28 23:00:26 +01:00
Max Kellermann ee327db517 fs/FileSystem: remove unused WIN32 port of StatFile() 2015-02-28 23:00:26 +01:00
Max Kellermann 90a61b6bab fs/FileInfo: new library providing GetFileInfo()
Replaces StatFile(), with a portable data object.
2015-02-28 23:00:26 +01:00
Max Kellermann e1a434edbc fs/Path: make IsAbsolute() const 2015-02-28 23:00:26 +01:00
Max Kellermann 6b3b1cbd99 fs/FileSystem: use GetFileAttributes() on WIN32 if possible 2015-02-27 19:15:31 +01:00
Max Kellermann 4dd861ee23 fs/FileSystem: merge CheckAccess() into PathExists()
PathExists() should better do what CheckAccess() does, and
CheckAccess() doesn't do what its name implies.
2015-02-27 19:13:46 +01:00
Max Kellermann 4f0f81a047 fs/DirectoryReader: use FindFirstFile(), FindNextFile() on WIN32 2015-02-26 18:11:02 +01:00
Max Kellermann e3908c8de6 fs/Traits: add constant CURRENT_DIRECTORY 2015-02-25 19:53:35 +01:00
Max Kellermann 81c49fba03 fs/AllocatedPath: add nullptr_t constructor 2015-02-25 19:53:35 +01:00
Max Kellermann eb174d5ba3 fs/{Allocated,}Path,Charset: use PathTraitsFS typedefs 2015-02-25 19:17:45 +01:00
Max Kellermann 4c899e9c5a fs/FileSystem: remove unused FOpenModes 2015-02-25 19:17:45 +01:00
Max Kellermann 00b0f6ad51 fs/io/File{Reader,OutputStream}: convert path to UTF-8 for error message 2015-02-25 19:10:51 +01:00
Max Kellermann 9c83d3c78c fs/io/FileOutputStream: use CREATE_ALWAYS instead of TRUNCATE_EXISTING
Fixes yet another breakage of creating the database+state file on
Windows.
2015-02-10 13:41:09 +01:00
Max Kellermann 60e6d1d61b fs/Charset: convert #ifdef to regular "if" 2015-02-09 07:44:21 +01:00
Max Kellermann 975e275030 fs/Charset: change FixSeparators() API to use std::string&& 2015-02-08 17:52:01 +00:00
Max Kellermann ff2b427cc1 Merge tag 'v0.19.9' 2015-02-06 17:15:31 +01:00
Max Kellermann d38034bb5c fs/io/FileOutputStream: don't auto-delete file on WIN32
The file handle is never reset to INVALID_HANDLE_VALUE, and thus the
destructor will assume the operation shall be cancelled and will
delete the temporary file.

This was a major breakage for saving the database file and the state
file.
2015-02-06 14:36:55 +01:00
Max Kellermann 6cdb2a4896 fs/io/BufferedReader: count line numbers
Replaces the dirty code in config/ConfigFile.cxx.
2015-01-21 23:43:32 +01:00
Max Kellermann 1c3f5517fa config/Option: convert to strictly-typed enum 2015-01-21 23:30:00 +01:00
Max Kellermann eaf0662b75 fs/io/FileOutputStream: add static method Create() 2015-01-14 19:44:28 +01:00
Max Kellermann b043b2a761 fs/AllocatedPath: add operator== 2015-01-13 10:42:29 +01:00
Max Kellermann 8b217d5313 fs/io/FileOutputStream: use O_TMPFILE if available
The Linux feature allows writing new files to an invisible file, and
then replace the old file.  This preserves the old file if we get
interrupted by some event.
2015-01-06 19:38:55 +01:00
Max Kellermann 81df45a893 fs/io/File{Reader,OutputStream}: use OpenFile() 2015-01-05 23:13:35 +01:00
Max Kellermann 712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann 412bedb697 Merge branch 'v0.19.x' 2014-12-26 14:40:32 +01:00