diff options
author | Ralph Amissah <ralph@amissah.com> | 2016-08-22 10:31:34 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2019-04-04 14:53:41 -0400 |
commit | 39b78293cbab8ce9df020a6754d3aae6624dab71 (patch) | |
tree | 319fb68bbea334377dde13644247153ff20315d7 /src/undead/internal | |
parent | step 0.6.3 includes fixes (diff) |
sdlang uses lexer.d which uses stream.d which phobos is to drop 2016-10
* stream & its depends:
src/undead/stream.d
src/undead/internal/file.d
src/undead/doformat.d
* https://github.com/DigitalMars/undeaD/blob/master/src/undead/
Diffstat (limited to 'src/undead/internal')
-rw-r--r-- | src/undead/internal/file.d | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/undead/internal/file.d b/src/undead/internal/file.d new file mode 100644 index 0000000..f756674 --- /dev/null +++ b/src/undead/internal/file.d @@ -0,0 +1,25 @@ +// Written in the D programming language + +module undead.internal.file; + +// Copied from std.file. undead doesn't have access to it, but some modules +// in undead used std.file.deleteme when they were in Phobos, so this gives +// them access to a version of it. +public @property string deleteme() @safe +{ + import std.conv : to; + import std.file : tempDir; + import std.path : buildPath; + import std.process : thisProcessID; + static _deleteme = "deleteme.dmd.unittest.pid"; + static _first = true; + + if(_first) + { + _deleteme = buildPath(tempDir(), _deleteme) ~ to!string(thisProcessID); + _first = false; + } + + return _deleteme; +} + |