Commit graph

153 commits

Author SHA1 Message Date
David Nadlinger
6a818c645c Run all std.file unit tests on OS X as well.
I can see no obvious reason why they wouldn't work there, and indeed they all pas on my OS X Lion box.
2011-07-30 10:18:03 +02:00
David Nadlinger
dc0bfdb1ec Use lstat64() on OS X like on other Posix systems.
Previously, the code was special-cased to use `stat64()` on OS X for no apparent reason (I searched the logs, but couldn't find anything obvious). This also caused the new `symlink()` unit tests to fail.
2011-07-30 10:17:36 +02:00
jmdavis
823683febf Some messages to help diagnose sporadic test failure in std.file. 2011-07-30 01:07:20 -07:00
jmdavis
4bbdfc06ea Okay, _actually_ fix Windows build break.
I really need to get my Windows setup working again...
2011-07-29 23:40:32 -07:00
jmdavis
0f0d1f1565 Fix Windows build break. 2011-07-29 23:39:24 -07:00
jmdavis
cafe6c4380 Templated symlink and readLink based on character type.
Now that toUTFz is in Phobos, we can start templatizing std.file's
function's based on character type.
2011-07-23 21:03:24 -07:00
jmdavis
c6f53e9358 Merge branch 'master' into symlink 2011-07-23 14:02:59 -07:00
KennyTM~
32d24ea24d std.file.read: Create the uinitialized arrays using ubyte[] to ensure NO_SCAN after commit 78ace9c 2011-07-17 15:41:14 +08:00
KennyTM~
df4e92d712 (Minor cleanup) Change some idiomic GC.malloc usage to uninitializedArray
Simplify the common pattern `(cast(T*)GC.malloc(T.sizeof * n, NO_SCAN))[0 .. n]` to the new function `uninitializedArray!(T[])(n)`.

Note that there was some `NO_SCAN` attributes originally determined at runtime using `typeid()`, but now is determined statically using `hasIndirection!()` from the implementation of `uninitializedArray`.
There were also some `GC.malloc` usage looks like `uninitializedArray` in `std.parallelism` but I'm leaving it alone for someone who is more familiar with this module ;).
2011-07-14 04:29:34 +08:00
jmdavis
5fcd6132d9 Merge branch 'master' into symlink
Conflicts:
	std/file.d
2011-07-12 23:23:56 -07:00
jmdavis
7893ce2342 Removed alias which the spellchecker will catch.
Base on discussions on the Announce group with regards to deprecation,
it sounds like it would be reasonable to skip the deprecation step with
simple function renaming that the compiler will catch and tell you the
corrected name with its spellchecker. So, I'm removing the alias for
isSymLink and just fixing the name straight up. It's unlikely that all
that many people are using it yet anyway, since it hasn't been around
for very long.
2011-07-12 18:37:43 -07:00
Jonathan M Davis
d90c486222 Merge pull request #136 from dawgfoto/FixupPull105
Fixup pull 105 (broken relative dirEntries)

This should get rid of a regression with regards to dirEntries and relative paths.
2011-07-10 03:29:01 -07:00
dawg
c88b0f1278 rewrite dirEntries unittest so that...
- it runs on every platform
 - does qualitative checks
 - tests relative paths
2011-07-08 14:08:55 +02:00
jmdavis
dce4147625 Fixed some deprecation messages. 2011-07-08 01:13:45 -07:00
dawg
badc6f8593 undo changing dirEntries semantic
- dirEntries used to accept relative paths, so don't force
   absolute paths now
2011-07-08 03:07:48 +02:00
dawg
c23f2f1065 remove double path join
- same same but Windows
2011-07-08 03:07:47 +02:00
dawg
5b4b02b573 remove double path join
- DirEntry's _init function is already joining pathes
2011-07-08 02:59:13 +02:00
jmdavis
5532474e92 Merge branch 'master' into symlink
Conflicts:
	std/file.d
2011-07-04 03:03:30 -07:00
jmdavis
09b7cf618b Adjusting deprecation dates for a July release. 2011-07-04 01:46:26 -07:00
jmdavis
16f6633313 Added symlink and readLink for Posix. 2011-06-22 23:57:17 -07:00
jmdavis
01782a8311 Fixed camelcasing for existing symlink stuff. 2011-06-22 23:53:37 -07:00
Andrei Alexandrescu
452926cf0a Merge pull request #105 from blackwhale/regexp-to-regex
make dirEntries return InputRange (formly regex to regexp)
2011-06-21 11:55:27 -07:00
Dmitry Olshansky
37393151e2 DirIterator: add _ to private fields, detab, more asserts. 2011-06-20 17:25:36 +04:00
Dmitry Olshansky
399d782441 Minor fixes to dirEntries, std.regexp -> local import. 2011-06-16 01:33:16 +04:00
Dmitry Olshansky
3653fc1a71 DDoc examples for dirEntries 2011-06-15 13:57:05 +04:00
Dmitry Olshansky
6309e595dd Docs for dirEntries 2011-06-15 03:14:04 +04:00
Dmitry Olshansky
c28846715a Make DirIterator an InputRange (Posix) 2011-06-13 22:34:28 +04:00
Dmitry Olshansky
4ac7d6e9d7 Make DirIterator an InputRange (Win32) 2011-06-13 15:46:41 +04:00
Dmitry Olshansky
a54e84e4a9 Schedule all listDir for deprecation 2011-06-10 15:04:25 +04:00
Andrei Alexandrescu
55493bc90b Merge pull request #87 from klickverbot/cenforce-errno
Restored error code reading to cenforce().
2011-06-09 19:21:18 -07:00
David Nadlinger
d53c26ad7d Restored error code reading to cenforce().
The getErrno() was removed completely in commit cf02c92 by Shin without any further comment instead of just calling GetLastError on Windows.
2011-06-09 05:20:36 +02:00
andralex
d8465d532d https://github.com/D-Programming-Language/phobos/pull/37 2011-06-08 09:58:52 -05:00
andralex
69d6c6d9f8 Improvements to std.file.remove's error message 2011-06-05 10:59:13 -05:00
Denis
8d6e91d654 Fixed comment about GetCurrentDirectory's return value
No unnecessary heap allocations
No silent incorrect behaviour under race hazard
2011-06-05 01:47:57 -07:00
jmdavis
77f4b552c6 Changed isX functions which took attributes to attrIsX.
The isX functions which take attributes where forced to be properties,
since you can't overload property functions with non-property functions,
but without UFCS, once @property is enforced, those functions would
become illegal to call. So, I just renamed them and scheduled the old
versions for deprecation. The string versions are unchanged.
2011-06-01 01:10:10 -07:00
jmdavis
19bb914cca Adjust getTimes and scheduled getTimesPosix for deprecation. 2011-06-01 00:41:32 -07:00
jmdavis
321c79c2e0 Removed most of the static assert(0, "Unsupported/Unknown OS"); lines.
Now there's only one for the whole file. Upon implementing std.file for
a new OS, for some of the functions, the unit tests will fail to compile
and show that those functions still need to be written. Unfortunately,
not all will be caught that way (since some functions lack unit tests
and some of the unit tests are OS-specific), but it'll cut down on the
extra stuff in the file which may never matter anyway, since we may
never add on OS which is neither Windows nor Posix.
2011-05-31 23:53:07 -07:00
denis-sh
a65927d46a Removed my unnecessary temp "std.__fileinit." 2011-05-27 05:48:16 -07:00
denis-sh
87b3eae25d A race hazard in my patch and in phobos code (if compiled with -noboundscheck) is removed. 2011-05-27 05:45:55 -07:00
jmdavis
d07e48bd1f Improved versioned blocks per Andrei's request.
I also further updated some of the documentation.
2011-05-26 00:34:32 -07:00
jmdavis
3317e95e66 Improved deprecation messages. 2011-05-26 00:34:32 -07:00
jmdavis
cf1da98bec Fixed some documentation versioning.
Now, all of the documented functions in std.file should show up in the
documentation regardless of which OS that they're built on.
2011-05-26 00:34:31 -07:00
Andrei Alexandrescu
1f6a488885 Fixed versioning bug 2011-05-11 00:37:43 -05:00
Walter Bright
e99e941f44 not enough leeway for Windows 2011-05-06 17:37:02 -07:00
denis-sh
fd2a009095 Issue 5927 fix - Broken getcwd when using GetCurrentDirectoryA 2011-05-04 23:51:16 -07:00
Walter Bright
17ba21bee0 not enough leeway for my system 2011-05-03 15:54:17 -07:00
Andrei Alexandrescu
055cea0595 Merge branch 'master' of github.com:D-Programming-Language/phobos
Conflicts:
	posix.mak
2011-04-06 00:32:29 -05:00
Walter Bright
83f99df573 remove octal literals 2011-04-01 22:34:46 -07:00
Andrei Alexandrescu
1083bd4e7b One pass through std.range and friends
* Made emplace faster and replaced calls to it to also make them faster.

* Replaced phobos.d in posix.mak with index.d.

* Added version=StdDdoc to documentation build in posix.mak, and replaced uses of D_Ddoc with it.

* Improved documentation target in posix.mak (target dir automatically created).

* Added nice documentation table and cheat sheet at the top of std.algorithm.

* Replaced a few helper structs in std.range and std.algorithm with local structs, which simplify matters a fair amount.

* Added more constraints to functions in std.algorithm (still work in progress).

* Improved error message in std.algorithm.sort in case of failure to sort.

* std.random.dice(1, 10) now works (no need for array notation std.random.dice([1, 10])).

* Fixed documentation bugs and insufficiencies in std.range (still more to do).

* Improved speed of walkLength.

* Simplified retro.

* Simplified and optimized stride. Also folded stride(stride(r, a), b) into stride(r, a * b).

* Added roundRobin to std.range, which as a perk simplified radial.

* Added takeOne and takeNone to std.range.

* Added unsigned to std.traits.
2011-02-27 12:38:49 -06:00
Walter Bright
046e1b36db add source links 2011-02-06 15:46:50 -08:00