summary refs log tree commit diff
path: root/src/libstd/os.rs
AgeCommit message (Collapse)AuthorLines
2013-09-23std: merge rand::{Rng,RngUtil} with default methods.Huon Wilson-2/+2
Also, documentation & general clean-up: - remove `gen_char_from`: better served by `sample` or `choose`. - `gen_bytes` generalised to `gen_vec`. - `gen_int_range`/`gen_uint_range` merged into `gen_integer_range` and made to be properly uniformly distributed. Fixes #8644. Minor adjustments to other functions.
2013-09-18auto merge of #9296 : alexcrichton/rust/snapshots, r=cmrbors-12/+0
huzzah!
2013-09-18Register new snapshotsAlex Crichton-12/+0
2013-09-18fix compilation errors of mips targetJyun-Yan You-1/+1
2013-09-17auto merge of #9235 : olsonjeffery/rust/newrt_file_io_1, r=thestingerbors-10/+1
A quick rundown: - added `file::{readdir, stat, mkdir, rmdir}` - Added access-constrained versions of `FileStream`; `FileReader` and `FileWriter` respectively - big rework in `uv::file` .. most actions are by-val-self methods on `FsRequest`; `FileDescriptor` has gone the way of the dinosaurs - playing nice w/ homing IO (I just copied ecr's work, hehe), etc - added `FileInfo` trait, with an impl for `Path` - wrapper for file-specific actions, with the file path always implied by self's value - has the means to create `FileReader` & `FileWriter` (this isn't exposed in the top-level free function API) - has "safe" wrappers for `stat()` that won't throw in the event of non-existence/error (in this case, I mean `is_file` and `exists`) - actions should fail if done on non-regular-files, as appropriate - added `DirectoryInfo` trait, with an impl for `Path` - pretty much ditto above, but for directories - added `readdir` (!!) to iterate over entries in a dir as a `~[Path]` (this was *brutal* to get working) ...<del>and lots of other stuff</del>not really. Do your worst!
2013-09-17std: fix win32 build issue re: multistring parsingJeff Olson-1/+1
2013-09-17std: fix win32 build error in os::env()Jeff Olson-1/+1
2013-09-16std: more work on from_c_multistring.. let it take an optional len paramJeff Olson-1/+1
2013-09-16std: win32 os::env() str parsing to str::raw::from_c_multistring + testJeff Olson-10/+1
2013-09-16switch Drop to `&mut self`Daniel Micay-2/+2
2013-09-16std::os: Use unicode for last_os_error() on Win32klutzy-10/+9
FormatMessageA may return non-ascii message, which is encoded as system code page, not utf8. This may cause `assert!(is_utf8(v))` failure on some non-English machines. This patch replaces it with FormatMessageW, which returns utf-16 message. Fixes `make check-stage2-std` failure on my machine. :)
2013-09-15rm some uses of the `advance` iterator methodDaniel Micay-2/+2
2013-09-13std: Fix another windows problem with the unwrap_or_default renameErick Tryzelaar-1/+1
2013-09-13std: rename Option.chain to Option.and_then on windowsErick Tryzelaar-1/+1
2013-09-12std: rename Option::unwrap_or_default() to unwrap_or()Erick Tryzelaar-1/+1
2013-09-09rename `std::iterator` to `std::iter`Daniel Micay-1/+1
The trait will keep the `Iterator` naming, but a more concise module name makes using the free functions less verbose. The module will define iterables in addition to iterators, as it deals with iteration in general.
2013-09-05Replace os::glob with extra::glob, which is written in rust,Gareth Smith-84/+0
fixing issue #6100.
2013-09-04libstd/os: set tmp dir to /data/tmp on Androidadridu59-1/+7
Android has no /tmp partition, return /data/tmp instead. Cf. #8511.
2013-08-30std: Add a file-renaming function to std::osTim Chevalier-0/+12
2013-08-28Fixed MemoryMap on Windows.Vadim Chugunov-25/+42
2013-08-27librustc: Remove `&const` and `*const` from the language.Patrick Walton-1/+1
They are still present as part of the borrow check.
2013-08-26std: Add Win64 supportklutzy-2/+36
Some extern blobs are duplicated without "stdcall" abi, since Win64 does not use any calling convention. (Giving any abi to them causes llvm producing wrong bytecode.)
2013-08-23auto merge of #8681 : mrordinaire/rust/remove-set_args, r=brsonbors-25/+6
2013-08-22Enabled unit tests in std and extra.Vadim Chugunov-2/+0
2013-08-23removed os::set_args, closing #8325Do Nhat Minh-25/+6
removed pub on real_args, changed test to use args
2013-08-19Add externfn macro and correctly label fixed_stack_segmentsNiko Matsakis-6/+92
2013-08-18auto merge of #8551 : huonw/rust/speling, r=alexcrichtonbors-1/+1
(This doesn't add/remove `u`s or change `ize` to `ise`, or anything like that.)
2013-08-16doc: convert remaining uses of core:: to std::.Huon Wilson-1/+1
2013-08-15Add ToCStr method .with_c_str()Kevin Ballard-24/+24
.with_c_str() is a replacement for the old .as_c_str(), to avoid unnecessary boilerplate. Replace all usages of .to_c_str().with_ref() with .with_c_str().
2013-08-10std: merge Iterator and IteratorUtilErick Tryzelaar-1/+1
2013-08-10Mass rename of .consume{,_iter}() to .move_iter()Erick Tryzelaar-1/+1
cc #7887
2013-08-09auto merge of #8296 : erickt/rust/remove-str-trailing-nulls, r=ericktbors-104/+114
This PR fixes #7235 and #3371, which removes trailing nulls from `str` types. Instead, it replaces the creation of c strings with a new type, `std::c_str::CString`, which wraps a malloced byte array, and respects: * No interior nulls * Ends with a trailing null
2013-08-09Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-2/+2
remove-str-trailing-nulls
2013-08-09Remove the C++ runtime. SayonaraBrian Anderson-24/+4
2013-08-09std: more windows fixes to os.rs and run.rsErick Tryzelaar-3/+5
2013-08-09std: Fix perf of local allocations in newschedBrian Anderson-2/+2
Mostly optimizing TLS accesses to bring local heap allocation performance closer to that of oldsched. It's not completely at parity but removing the branches involved in supporting oldsched and optimizing pthread_get/setspecific to instead use our dedicated TCB slot will probably make up for it.
2013-08-08Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-3/+1
remove-str-trailing-nulls
2013-08-08std: more fixes for os.rs for windowsErick Tryzelaar-2/+3
2013-08-07std: import HANDLE for os::list_dir for windowsErick Tryzelaar-0/+1
2013-08-07core: option.map_consume -> option.map_moveErick Tryzelaar-3/+1
2013-08-06Merge remote-tracking branch 'remotes/origin/master' into ↵Erick Tryzelaar-3/+3
remove-str-trailing-nulls
2013-08-05std: fix a typo where .to_c_str wasn't being called on androidErick Tryzelaar-1/+1
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-3/+3
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-04Merge remote-tracking branch 'remotes/origin/master' into str-remove-nullErick Tryzelaar-8/+8
2013-08-04std: remove use of cast module from os.Erick Tryzelaar-13/+6
2013-08-04std: merge str::raw::from_buf and str::raw::from_c_strErick Tryzelaar-1/+1
2013-08-04std and rustc: explicitly pass c strings to c functionsErick Tryzelaar-42/+52
When strings lose their trailing null, this pattern will become dangerous: let foo = "bar"; let foo_ptr: *u8 = &foo[0]; Instead we should use c_strs to handle this correctly.
2013-08-04std: replace str::as_c_str with std::c_strErick Tryzelaar-30/+33
2013-08-04std: cleanup os and str testsErick Tryzelaar-28/+28
2013-08-04std: add str.to_c_str()Erick Tryzelaar-1/+1