On Monday, 7 July 2014 at 16:02:33 UTC, Kagamin wrote:
On Monday, 7 July 2014 at 14:25:54 UTC, Regan Heath wrote:
If I had to guess, I would say it would still be possible to
access the file.
It's documented so. I guess, linux implements file deletion
with delete-on-close feature too, if it
See if stdio allows you to specify delete sharing when opening
the file.
On windows files are traditionally opened without delete sharing,
such files can't be deleted until closed, because all sharing
options are always honored.
On Monday, 7 July 2014 at 10:19:01 UTC, Kagamin wrote:
See if stdio allows you to specify delete sharing when opening
the file.
I don't know what delete sharing is exactly, but the File
constructor simply calls fopen and I don't see any option for the
Windows fopen that seems to do it:
On Mon, 07 Jul 2014 12:17:34 +0100, Joakim dl...@joakim.airpost.net
wrote:
On Monday, 7 July 2014 at 10:19:01 UTC, Kagamin wrote:
See if stdio allows you to specify delete sharing when opening the file.
I don't know what delete sharing is exactly, but the File constructor
simply calls
On Monday, 7 July 2014 at 11:17:35 UTC, Joakim wrote:
On Monday, 7 July 2014 at 10:19:01 UTC, Kagamin wrote:
See if stdio allows you to specify delete sharing when opening
the file.
In std.stdio, File(name, mode) is forwarded to _wfopen on Windows
and to fopen on posix.
On Windows there
On Monday, 7 July 2014 at 12:00:48 UTC, Regan Heath wrote:
But! I agree with Adam, leave it as a thin wrapper. Being a
windows programmer by trade I would expect the remove to fail,
I would not expect all my files to be opened with delete
sharing enabled by default.
R
And I believe
It can be also a bad user experience, when delete succeeds only
pertially and doesn't free the disk space. Delete-on-close flag
should be better in this regard.
On Mon, 07 Jul 2014 15:18:51 +0100, Jesse Phillips
jesse.k.phillip...@gmail.com wrote:
On Monday, 7 July 2014 at 12:00:48 UTC, Regan Heath wrote:
But! I agree with Adam, leave it as a thin wrapper. Being a windows
programmer by trade I would expect the remove to fail, I would not
expect
On Monday, 7 July 2014 at 14:25:54 UTC, Regan Heath wrote:
If I had to guess, I would say it would still be possible to
access the file.
It's documented so. I guess, linux implements file deletion with
delete-on-close feature too, if it exists, a separate deletion
operation is not needed.
On Monday, 7 July 2014 at 12:00:48 UTC, Regan Heath wrote:
On Mon, 07 Jul 2014 12:17:34 +0100, Joakim
dl...@joakim.airpost.net wrote:
On Monday, 7 July 2014 at 10:19:01 UTC, Kagamin wrote:
See if stdio allows you to specify delete sharing when
opening the file.
I don't know what delete
I ran into this when trying to fix the Phobos unit tests and have
reduced it down to this test file:
import std.stdio, std.file;
void main() {
auto f = File(test.txt, w);
//f.close();
std.file.remove(test.txt);
}
This compiles and runs fine on linux and the autotester shows
that
On Saturday, 5 July 2014 at 20:23:03 UTC, Joakim wrote:
This seems like inconsistent behavior: should I file a bug?
This is because the operating systems do it differently; I think
D is doing the right thing by being a pretty thin wrapper around
that functionality.
If anything, I'd just
13 matches
Mail list logo