Commit graph

398 commits

Author SHA1 Message Date
Tomoya Tanjo
01d8dd9c6d Make std.file.getTimes safe 2014-08-23 12:49:09 +09:00
Михаил Страшун
fb82fa8c37 Merge pull request #2445 from tom-tan/safe-unittest-for-file-getSize
Mark a unittest for std.file.getSize as safe
2014-08-21 18:48:33 +02:00
Tomoya Tanjo
209447754f Mark std.file.getTimesWin as safe 2014-08-21 15:58:20 +09:00
Tomoya Tanjo
718b40e7b4 Mark a unittest for std.file.getSize as safe 2014-08-21 14:34:38 +09:00
Dmitry Olshansky
a108353290 Merge pull request #2385 from tom-tan/trusted-file-getSize
Mark std.file.getSize as trusted
2014-08-09 19:12:41 +04:00
Lars T. Kyllingstad
8ce300ac97 Deprecated most of the old std.process functions
I have purposefully omitted doing anything about the exec* function
family here, as their fate is still under discussion.
2014-08-07 21:21:19 +02:00
Joakim
60cfc11a11 Make all tests that create a temporary file in the local directory get the path from one central function, so they can be made to use an absolute path 2014-08-04 23:33:25 -05:00
Tomoya Tanjo
c572ce776e Use nested trusted function 2014-08-01 13:43:11 +09:00
Tomoya Tanjo
06c47d0157 Mark std.file.getSize as trusted 2014-07-31 15:18:37 +09:00
Tomoya Tanjo
9157f52e51 Mark unittests for std.file.readText, rename and exists as safe 2014-07-31 11:36:30 +09:00
David Nadlinger
b5a783bf40 Merge pull request #2378 from tom-tan/trusted-file-readText
Mark std.file.readText as trusted
2014-07-30 18:16:14 +02:00
Tomoya Tanjo
7aecde3a55 Mark std.file.readText as trusted 2014-07-31 00:17:24 +09:00
Tomoya Tanjo
e339c907e1 Mark std.file.getFileAttributesWin as trusted and makeUlong as safe pure
nothrow nogc
2014-07-30 13:41:39 +09:00
Tomoya Tanjo
b4fef5d17a Mark a unittest for std.file.read as safe 2014-07-28 19:09:59 +09:00
Dmitry Olshansky
3fe0424b89 Merge pull request #2293 from tom-tan/trusted-file-read
Mark std.file.read as @trusted
2014-07-28 02:09:32 +04:00
Михаил Страшун
ec51209c9f Merge pull request #1653 from denis-sh/fix-bug-7648-comments
Fix bug 7648 comment in `std.stdio.File` and add bug section to `std.file.slurp`.
2014-07-12 05:17:13 +03:00
Михаил Страшун
3ee34072a6 Merge pull request #2150 from joakim-noah/android
Get tests passing on Android/x86
2014-07-12 04:05:07 +03:00
Tomoya Tanjo
f18dd38074 Mark std.file.write and append as trusted 2014-07-11 11:39:02 +09:00
David Nadlinger
e3888bd717 Merge pull request #2298 from tom-tan/trusted-file-writeImpl
Mark std.file.writeImpl as @trusted
2014-07-10 21:43:01 +02:00
David Nadlinger
057909bd2c Merge pull request #2300 from tom-tan/trusted-file-remove
Mark std.file.remove as @trusted
2014-07-10 20:15:07 +02:00
Joakim
11de397dd7 Start getting tests passing on Android/x86 2014-07-09 17:52:15 -05:00
Tomoya Tanjo
97259e87a6 Fix trustedRef 2014-07-04 15:38:42 +09:00
Tomoya Tanjo
65ef3b21e8 Using nested trusted functions 2014-07-04 15:10:13 +09:00
Tomoya Tanjo
6a24d5880e Change ReadFile(...) == 1 to ReadFile(...) != 0 2014-07-04 14:07:38 +09:00
Tomoya Tanjo
5774ec8492 Mark std.file.remove as @trusted 2014-07-03 16:04:47 +09:00
Tomoya Tanjo
0951655959 Mark std.file.rename as @trusted 2014-07-03 15:55:00 +09:00
Tomoya Tanjo
8b737f4606 Mark std.file.writeImpl as @trusted 2014-07-03 15:40:19 +09:00
Tomoya Tanjo
8feab930b6 Mark std.file.read as @trusted 2014-07-02 19:37:56 +09:00
k-hara
c90ef1b823 Mark some unittest blocks deprecated to suppress messages during Phobos build 2014-06-29 15:52:06 +09:00
Denis Shelomovskij
ccdfd1ecca Remove unused WinAPI ANSI function usages. 2014-06-12 17:22:18 +04:00
Andrej Mitrovic
45ef22eeab Merge pull request #1940 from JakobOvrum/fixgloblink
Fix cross-reference to std.path.globMatch from std.file.dirEntries
2014-02-15 12:32:00 +01:00
Jakob Ovrum
27a9b5987d Fix cross-reference to std.path.globMatch from std.file.dirEntries 2014-02-15 11:16:08 +01:00
Vladimir Panteleev
88f694dee3 std.file: Fix rmdirRecurse and symlinks/junctions on Windows 2014-02-15 03:36:54 +00:00
k-hara
b391b2ec9f Convert to new alias syntax 2014-02-11 15:27:05 +09:00
monarchdodra
fd8540072d Remove trailing white 2014-01-08 08:30:28 +01:00
Andrej Mitrovic
1d7912c679 Merge pull request #1142 from MikeWey/Issue8298
Fix Issue #8298, Don't throw exceptions on broken symlinks.
2014-01-07 16:23:42 -08:00
Vladimir Panteleev
2c981df4d1 std.file: Simplify/optimize mkdirRecurse
The left.length != pathname.length check both takes care of the
Windows-only check, and it avoids a pointless stat on the FS root.
2014-01-06 13:34:59 +00:00
Vladimir Panteleev
d3f9e24f91 std.file: Fix race condition when mkdirRecurse runs concurrently
mkdirRecurse would crash if a directory was created between its
exists() and mkdir() calls. This could occur if mkdirRecurse was called
at the same time from mutiple threads or processes.

Instead of relying on the exists() check to indicate whether the next
mkdir() should succeed, we explicitly ignore "already exists" errors
from the OS. Note that this changes the behavior of mkdirRecurse when
the leaf directory already existed: previously it would throw, whereas
now it will silently succeed. The new behavior is conformant with some
other implementations of "recursive mkdir": the -p flag of the GNU
tool, Ruby's mkpath, Java's mkdirs, and Perl's make_path. (On the
other hand, the old behavior was equivalent to the behavior of
Python's makedirs).
2014-01-06 08:36:05 +00:00
Martin Nowak
5ab8dae665 fix Issue 11789 - No setAttributes to complement getAttributes
- add std.file.setAttributes

[Issue 11789](https://d.puremagic.com/issues/show_bug.cgi?id=11789)
2013-12-21 22:27:01 +01:00
Martin Nowak
f2e36c6d0b Revert "fix Issue 11789 - No setAttributes to complement getAttributes"
This reverts commit c124140e09.
2013-12-21 22:17:08 +01:00
Martin Nowak
c124140e09 fix Issue 11789 - No setAttributes to complement getAttributes
[Issue 11789](https://d.puremagic.com/issues/show_bug.cgi?id=11789)
2013-12-21 22:00:12 +01:00
jmdavis
efd6ea0cbf Move various deprecations along. 2013-12-11 23:44:12 -08:00
Mike Wey
eb4d5a0572 Fix Issue #8298, Don't throw exceptions on broken symlinks.
Using dirEntries to loop trough all the files/directories in a directory
will curently throw an Exception when encountering an broken symlink.

Whit this change DirEntry will no longer throw an Exception for broken
symlinks, but in that case isDir and isFile will return flase while
isSymlink returns true.
2013-11-13 22:57:05 +01:00
Walter Bright
fe9a3537ea fix Issue 11392 - dirEntries segfaults 2013-11-02 00:04:26 -07:00
safety0ff
249c6328ff Merge dirEntries unittests and modify to run within the same testdir. 2013-10-23 18:08:36 -04:00
Denis Shelomovskij
2932b9e7e5 Fix bug 7648 comment in std.stdio.File and add bug section to std.file.slurp.
Issue URL: http://d.puremagic.com/issues/show_bug.cgi?id=7648
2013-10-20 16:04:23 +04:00
Denis Shelomovskij
87b393e702 Fixup std.file.thisExePath.
It's dangerous to add `assert(0)` at unreachable location because is will force the compiler to not show error if the location accidentally became reachable.
2013-09-23 13:22:58 +04:00
Daniel Murphy
c0d297db5e Merge pull request #1224 from jacob-carlborg/get_process_path
Add function for getting the current process path.
2013-09-12 21:13:16 -07:00
Jacob Carlborg
bf6c129b95 Add function for getting the current executable path. 2013-09-06 11:27:42 +02:00
Lionello Lunesu
b4074054ba Fix issue 10893: added missing or renamed DDoc parameters (found by fix to 10236) 2013-08-31 15:36:29 +08:00