348e45260f
io: add a trivial type reader for fds
2022-09-14 14:18:49 +10:00
4d1ee7c21e
io: ensure override is used on overridden members
2021-06-03 12:56:44 +10:00
92afaf38ec
build: avoid double underscore header guards
2021-04-14 15:35:49 +10:00
957c4d169f
io: add expected_directory_error
2021-01-14 12:54:24 +10:00
ad916e61c9
io: add iterative file reading helper
2019-06-19 12:01:26 +10:00
072dce8891
io: ensure write/pwrite views use pointer iterators
2018-12-19 17:13:06 +11:00
bb812ba81c
io: add pwrite wrappers
2018-12-17 12:50:05 +11:00
1a82e4fe76
build: transition from experimental filesystem
2018-12-05 19:12:03 +11:00
f21369c15a
io: add an fd
overload for slurp
2018-10-18 12:51:56 +11:00
0de176591d
io: remove the view
overload for slurp
...
This just confuses matters. A `view` can be across arbitrary data, and
is often used as a representation of a file's _data_.
2018-10-18 12:50:21 +11:00
300ae9df73
win32/windows: add a defensive windows wrapper header
2018-08-27 14:16:27 +10:00
f6056153e3
rename root namespace from util to cruft
...
This places, at long last, the core library code into the same namespace
as the extended library code.
2018-08-05 14:42:02 +10:00
803acc9a87
relicense under MPL-2.0
2018-08-04 15:14:06 +10:00
0e3fa05f05
build: migrate from ipp files to pure hpp files
...
ipp files weren't a great way of keeping things clean, and IDEs have a
little trouble dealing with the split configuration. this simplifies
debugging a great deal.
2018-02-28 11:49:13 +11:00
5d32408126
io: allow write
to take rvalue file objects
...
This simplifies using temporaries in a few locations.
2018-01-31 19:31:57 +11:00
9045e16476
io: expose only view style read/write from io module
...
Allow the destination file-like object to implement whatever style
writers and readers they want, but don't expose those directly via the
io module.
2018-01-31 19:30:48 +11:00
8682381618
io: add slurp overload for string views
2018-01-30 12:53:43 +11:00
681768093e
hash: use a consistency, less flexible, interface
2018-01-13 15:24:12 +11:00
e2f0d23a6d
io: ensure we only write views that look like bytes
2018-01-10 18:50:02 +11:00
b8fd18f1cc
io: ensure view writes only take byte sized data
2018-01-10 18:50:02 +11:00
f2fa90d043
io: return views from write wrappers
2017-12-28 17:50:38 +11:00
ac685cfdd2
io: expose file-object variant of draining write
2017-12-26 17:24:42 +11:00
e48aebb503
io: remove lvalue write function
...
writing arbitrary lvalues is incredibly dangerous if we don't have total
coverage of suitable overloads. eg, we have accidentally written string
objects to file descriptors.
instead we prefer byte/char views which the user can create as desired.
there's a little more cognitive overhead here, but it's substantially
less dangerous in casual usage.
2017-12-19 18:18:10 +11:00
0351313c36
Merge branch 'master' into coord
2017-11-23 17:24:11 +11:00
34788756d2
build: don't use './' as an include prefix
...
GCC produces ODR error when including paths of the form './foo' and
'foo' in the same binary. Rather than managing duplication we just
universally pick the absolute form over the relative form.
2017-11-22 16:49:37 +11:00
c1aa0f7a3d
io: slurp should default to providing bytes, not chars
...
std::byte has less potential for abuse. if you want an array of chars
you should ask for it.
2017-09-12 14:18:34 +10:00
25e19b5810
build: use explicit constructors
2017-05-23 12:50:51 +10:00
31e9270e6b
build: fix missing windows includes
2016-11-17 18:38:08 +11:00
9a798446b5
build: remove unnecessary includes
...
discovered with include-what-you-use
2016-10-12 15:08:22 +11:00
e80c3c959c
io: return path object from path_error accessor
2016-10-08 17:28:06 +11:00
598c5d4e48
change const char paths to std::filesystem::path
2016-10-08 17:18:18 +11:00
48364cd227
build: use experimental::fs over boost::fs
2016-10-07 19:48:42 +11:00
98732179a7
io: add std::string overload to slurp
2016-10-07 18:08:41 +11:00
790728d3b1
posix/fd: extract file descriptor into own unit
2016-10-02 15:50:13 +11:00
5e597eef25
io: remove uneeded stream_error destructor
2016-05-12 17:53:37 +10:00
cc001c4788
win32/handle: merge various handle wrapper classes
2016-04-27 17:01:45 +10:00
aa780963e0
io: support piped streams in slurp
2016-04-19 14:52:05 +10:00
80158b7343
io: remove our wrapper flag types
2016-04-05 11:07:23 +10:00
ecb97143cf
io: don't add a null terminator with slurp
2016-03-17 18:06:45 +11:00
18c3a1eaaf
io: record path in path_error
2016-02-12 13:36:03 +11:00
6561e46018
memory: remove legacy scoped_malloc
2015-11-13 13:48:46 +11:00
620c2d3eb1
io: add FILE slurp overload
2015-10-29 17:52:19 +11:00
cb12d4fd1f
io: remove redundant write overloads
2015-10-29 10:51:42 +11:00
73720feceb
io: remove access_flag abstraction
2015-10-29 10:48:11 +11:00
ba9a8f8b35
io: add more write wrappers
2015-10-20 21:04:14 +11:00
0967c5252f
io: remove useless chdir wrapper
...
just use chdir directly.
2015-09-15 21:09:37 +10:00
b6ce75aca6
build: windows fixes
2015-07-23 13:53:48 +10:00
75a1f1e5e7
io: add more write overloads
2015-07-02 16:34:17 +10:00
a5ae97025c
io: add override specifiers
2015-06-30 22:24:43 +10:00
653ada4bfd
io: change slurp return type to vector
2015-06-11 19:28:03 +10:00