WebFreak001
dac59a4bde
add isSomeFiniteCharInputRange as simplification
...
combines the very common constraint
`isInputRange!R && !isInfinite!R && isSomeChar!(ElementEncodingType!R)`
and adds a bunch of documentation with examples for users to understand
it better. This should lower the neccessary needed technical insight to
read basic docs, especially std.path and std.file docs.
2022-01-15 18:38:52 +01:00
dkorpel
5d0cfcd13a
Fix scope
usage of SysTime/TimeZone
2021-11-18 23:49:51 +00:00
dkorpel
cd7389266e
Add explicit return
to inout
functions
2021-11-16 23:22:33 +00:00
Nathan Sashihara
2ba87d2ff7
Delete the bodies of a number of private wrapper functions in std.stdio and std.file
2021-10-28 06:10:01 -04:00
RazvanN7
85f426020a
Move import of dirSeparator to larger scope
2021-10-22 14:52:57 +03:00
Ryan Frame
02f4f148cf
Fix Issue 17488 - Add trailing slash to POSIX tempDir() to match Windows behaviour
2021-10-22 14:52:57 +03:00
Luís Ferreira
c047b238e3
std.file: don't initialize stat_t struct when running stat
...
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-09-04 20:05:44 +01:00
vladchicos
95329239c9
Windows readImpl is now marked @trusted
2021-08-02 17:55:56 +03:00
vladchicos
f3be11dc29
Fix Issue 16218 - Windows std.file.readImpl should be marked @system.
2021-08-01 14:59:39 +03:00
aG0aep6G
26bb8fcae4
add cast(void) to silence warnings in tests ( #8169 )
2021-07-20 08:19:00 +08:00
Luís Ferreira
808dca99af
file: document dirEntries as no garantee of sorted output
...
Some unittests should compare with a sorted array to be
correct.
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2021-06-20 10:52:39 +00:00
nordlow
61d60d2121
Annotate std/file.d to please dlang/dmd#12520
2021-05-20 13:14:21 +02:00
Atila Neves
771e5460b7
Make rmdir unittest @safe
2021-05-10 16:36:18 +02:00
Atila Neves
834ecfb609
Make mkdirRecurse unittest @safe
2021-05-10 16:35:37 +02:00
Atila Neves
f13839de44
Make unittest @safe
2021-05-10 16:34:33 +02:00
Atila Neves
e1a1c286b2
Make isFile unittest @safe
2021-05-10 16:30:50 +02:00
Atila Neves
cd16c4e741
Make DirEntry unittest @safe
2021-05-10 16:30:06 +02:00
Atila Neves
c2b6dbb0bb
Make timeLastModified
unittest @safe
2021-05-10 16:29:17 +02:00
Atila Neves
88808733f8
Make setTimes
unittest @safe
2021-05-10 16:27:55 +02:00
Atila Neves
8573787e1c
Make gettimes
unittest @safe
2021-05-10 16:26:46 +02:00
Atila Neves
09e1f93043
Make append
unittest @safe
2021-05-10 16:24:49 +02:00
Atila Neves
6dd5f57225
Make write
test @safe
2021-05-10 16:23:16 +02:00
Iain Buclaw
44f589b7b4
Revert "std.file docs: Tweak dirEntries examples"
2021-04-24 16:46:12 +02:00
Nick Treleaven
e5a6ba3714
fix missing doc example warning
...
std/file.d(4950:6)[warn]: Public declaration 'dirEntries' has no documented example.
2021-03-23 17:03:23 +00:00
Nick Treleaven
c47aa37f0e
Review tweaks
2021-03-23 13:09:08 +00:00
Nick Treleaven
77cdd7a980
fix style check
2021-03-22 18:46:22 +00:00
Nick Treleaven
a7cb83ee5f
std.file docs: Tweak dirEntries examples
...
Use selective imports for `listdir` example, not fully qualified calls.
Don't use `args`, use current directory for working runnable example.
Move parallel dmd example into a documented unittest. Use `pattern`
argument instead of filter & endsWith for simplicity. Note the
`listdir` example already uses `map`.
Only run these 'tests' for version(StdDdoc).
2021-03-22 13:51:20 +00:00
berni44
6f2a0934a7
Adapt imports of std.format to new structure of std.format.
2021-03-19 13:22:00 +01:00
Iain Buclaw
d2ec9db951
std.file: Use core.sys.darwin.mach.dyld module
2021-02-02 14:03:18 +01:00
Iain Buclaw
0df7288a50
std.file: Use core.sys.platform.sys.sysctl module
2021-02-02 14:03:18 +01:00
Iain Buclaw
c6c8b12852
Implement missing OpenBSD ports in phobos
2021-02-01 18:46:54 +01:00
Luís Ferreira
5ce45f91d2
file: make rmdirRecurse @safe
...
`rmdirRecurse` should be @safe as the cast(string) is safe in this context and
dirEntries, even though @system, it uses a RefCounted iterator which inside
will always make the reference deleted as the reference will never be passed
outside the function scope.
Signed-off-by: Luís Ferreira <contact@lsferreira.net>
2020-10-29 05:25:03 +01:00
Andrei Alexandrescu
c5e6213dde
Issue 21250 - dirEntries on non-existent directory causes assert error ( #7646 )
...
Issue 21250 - dirEntries on non-existent directory causes assert error
merged-on-behalf-of: Andrei Alexandrescu <andralex@users.noreply.github.com>
2020-10-02 16:49:09 +02:00
Nathan Sashihara
b8e9e70e90
Fix Issue 20370 - On POSIX, std.file.copy only copies the file times at second precision
2020-09-16 09:31:41 +02:00
Nils Lankila
e36b5aaba0
fix issue 21148, possible failure of CI when testing nano precision of file time stamps ( #7589 )
...
fix issue 21148, possible failure of CI when testing nano precision of file time stamps
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2020-08-13 10:12:08 +02:00
Euan Torano
8e03a95457
Fix issue 21113: Use sysctl for thisExePath on BSD.
2020-08-05 10:20:11 +02:00
Nathan Sashihara
453faadf5b
Replace is(Unqual!T == Unqual!U) with is(immutable T == immutable U) for speed & memory usage
2020-08-03 15:07:32 +02:00
Nathan Sashihara
dfb9099055
Fix Issue 20785 - std.file.setTimes: on macOS use setattrlist to avoid truncating timestamp precision to microseconds
2020-05-18 15:07:27 -07:00
Geod24
04f3979317
Replace 'Issue XXX' with Bugzilla links
...
Make the links clickable, as was done in the DMD repository.
Also avoids any ambiguity w.r.t. where the issue is stored.
2020-04-13 16:28:09 +09:00
Jacob Carlborg
6425af57b1
Fix std.file unit test
...
The current working directory is not writeable on Apple's ARM platforms.
2020-03-03 12:51:07 +01:00
Jacob Carlborg
280f3fce87
Disable most of std.process
on iOS derived platforms
...
A process does not have permission to create new processes on
iOS derived platforms.
2020-03-03 12:51:07 +01:00
Jacob Carlborg
5bccc30ef7
Implement thisExePath
on iOS derived platforms
2020-03-03 12:51:07 +01:00
The Dlang Bot
1c91e85bb1
Merge pull request #7392 from mark-summerfield/patch-1
...
Added a chmod example in the description...
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2020-02-26 06:05:46 +01:00
Adam D. Ruppe
ae93f5317c
Use consistent quickindex wrapper around hand-written list-of-links tables
2020-02-21 21:04:05 -05:00
Mark
049acda282
Wrapped to 80 cols
...
The github editor doesn't show line lengths so I've guessed.
2020-02-06 08:03:14 +00:00
Mark
810f0dab52
Deleted spurious whitespace
2020-02-05 13:37:22 +00:00
Mark
817602e479
Added a chmod example in the description...
...
I added this because if you search the D docs for `chmod` no results appear. This should help with the search and also provide a useful example.
2020-02-05 11:19:08 +00:00
Alexandru Militaru
bb62aaca3d
Replaced version (unittest) with version (StdUnittest) to avoid unnecessary overhead when compiling with -unittest
2020-01-19 14:05:17 +02:00
The Dlang Bot
58cb6963fb
Merge pull request #7288 from berni44/issue11631
...
Clarify the behaviour of rename on posix systems.
merged-on-behalf-of: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
2019-11-21 02:14:02 +01:00
Bernhard Seckinger
fb9c323599
Clarify the behaviour of rename on posix systems.
2019-11-20 16:11:51 +01:00