about summary refs log tree commit diff
path: root/src/libstd/sys/windows/fs.rs
AgeCommit message (Collapse)AuthorLines
2015-01-21Fallout from stabilization.Aaron Turon-1/+1
2015-01-07Test fixes and rebase conflictsAlex Crichton-1/+1
2015-01-05std: Redesign c_str and c_vecAlex Crichton-1/+0
This commit is an implementation of [RFC 494][rfc] which removes the entire `std::c_vec` module and redesigns the `std::c_str` module as `std::ffi`. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0494-c_str-and-c_vec-stability.md The interface of the new `CString` is outlined in the linked RFC, the primary changes being: * The `ToCStr` trait is gone, meaning the `with_c_str` and `to_c_str` methods are now gone. These two methods are replaced with a `CString::from_slice` method. * The `CString` type is now just a wrapper around `Vec<u8>` with a static guarantee that there is a trailing nul byte with no internal nul bytes. This means that `CString` now implements `Deref<Target = [c_char]>`, which is where it gains most of its methods from. A few helper methods are added to acquire a slice of `u8` instead of `c_char`, as well as including a slice with the trailing nul byte if necessary. * All usage of non-owned `CString` values is now done via two functions inside of `std::ffi`, called `c_str_to_bytes` and `c_str_to_bytes_with_nul`. These functions are now the one method used to convert a `*const c_char` to a Rust slice of `u8`. Many more details, including newly deprecated methods, can be found linked in the RFC. This is a: [breaking-change] Closes #20444
2015-01-03sed -i -s 's/\bmod,/self,/g' **/*.rsJorge Aparicio-1/+1
2015-01-02std: Stabilize the prelude moduleAlex Crichton-1/+1
This commit is an implementation of [RFC 503][rfc] which is a stabilization story for the prelude. Most of the RFC was directly applied, removing reexports. Some reexports are kept around, however: * `range` remains until range syntax has landed to reduce churn. * `Path` and `GenericPath` remain until path reform lands. This is done to prevent many imports of `GenericPath` which will soon be removed. * All `io` traits remain until I/O reform lands so imports can be rewritten all at once to `std::io::prelude::*`. This is a breaking change because many prelude reexports have been removed, and the RFC can be consulted for the exact list of removed reexports, as well as to find the locations of where to import them. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md [breaking-change] Closes #20068
2014-12-29Test fixes and rebase conflictsAlex Crichton-2/+2
2014-12-21Fallout of std::str stabilizationAlex Crichton-1/+2
2014-12-20Fix the fallout of removing feature(import_shadowing).Eduard Burtescu-2/+1
2014-12-18Revise std::thread API to join by defaultAaron Turon-1/+1
This commit is part of a series that introduces a `std::thread` API to replace `std::task`. In the new API, `spawn` returns a `JoinGuard`, which by default will join the spawned thread when dropped. It can also be used to join explicitly at any time, returning the thread's result. Alternatively, the spawned thread can be explicitly detached (so no join takes place). As part of this change, Rust processes now terminate when the main thread exits, even if other detached threads are still running, moving Rust closer to standard threading models. This new behavior may break code that was relying on the previously implicit join-all. In addition to the above, the new thread API also offers some built-in support for building blocking abstractions in user space; see the module doc for details. Closes #18000 [breaking-change]
2014-12-09rollup merge of #19620: retep998/memorymapAlex Crichton-1/+1
2014-12-07Make MemoryMap use HANDLE on Windows.Peter Atashian-1/+1
Also fixes some conflicting module names. Signed-off-by: Peter Atashian <retep998@gmail.com>
2014-12-06libstd: remove unnecessary `as_slice()` callsJorge Aparicio-2/+2
2014-12-04libstd: io::fs::File::stat() need not to take &mut self.NODA, Kai-1/+1
The same goes for sys::fs::FileDesc::fstat() on Windows. Signed-off-by: NODA, Kai <nodakai@gmail.com>
2014-11-24Clean up FileType enum following enum namespacingBen S-6/+6
All of the enum components had a redundant 'Type' specifier: TypeSymlink, TypeDirectory, TypeFile. This change removes them, replacing them with a namespace: FileType::Symlink, FileType::Directory, and FileType::RegularFile. RegularFile is used instead of just File, as File by itself could be mistakenly thought of as referring to the struct. [breaking-change]
2014-11-18Windows and OS X falloutNick Cameron-1/+1
2014-11-08Runtime removal: refactor processAaron Turon-0/+460
This patch continues the runtime removal by moving and refactoring the process implementation into the new `sys` module. Because this eliminates APIs in `libnative` and `librustrt`, it is a: [breaking-change] This functionality is likely to be available publicly, in some form, from `std` in the future.