Remove EventDriverFiles.createTemp() and add adopt() instead.

The rationale is to keep the event loop abstraction at a minimal size. createTemp(), to be generally useful, would also require a getFilename(fd) method and possibly more. adopt() on the other hand is frequently useful for wrapping other libraries.
This commit is contained in:
Sönke Ludwig 2016-12-10 15:59:03 +01:00
parent de89a5a9e1
commit 7e9031439c
2 changed files with 9 additions and 4 deletions

View file

@ -119,7 +119,7 @@ interface EventDriverDNS {
interface EventDriverFiles {
@safe: /*@nogc:*/ nothrow:
FileFD open(string path, FileOpenMode mode);
FileFD createTemp();
FileFD adopt(int system_file_handle);
void close(FileFD file);
ulong getSize(FileFD file);