summary refs log tree commit diff
path: root/src/libstd/path
AgeCommit message (Collapse)AuthorLines
2014-01-07stdtest: Fix all leaked trait importsAlex Crichton-6/+4
2014-01-07std: Fill in all missing importsAlex Crichton-3/+6
Fallout from the previous commits
2014-01-08Renamed Option::map_default and mutate_default to map_or and mutate_or_setMarvin Löbel-1/+1
2013-12-30Add more benchmark tests to path/posixg3xzh-0/+41
Benchmark testing `is_ancestor_of` and `path_relative_from`
2013-12-23std: Fix all code examplesAlex Crichton-4/+3
2013-12-11Make 'self lifetime illegal.Erik Price-25/+25
Also remove all instances of 'self within the codebase. This fixes #10889.
2013-12-08Remove dead codesKiet Tran-5/+0
2013-12-04Revert "libstd: Change `Path::new` to `Path::init`."Kevin Ballard-356/+356
This reverts commit c54427ddfbbab41a39d14f2b1dc4f080cbc2d41b. Leave the #[ignores] in that were added to rustpkg tests. Conflicts: src/librustc/driver/driver.rs src/librustc/metadata/creader.rs
2013-12-04std::str: s/from_utf8_slice/from_utf8/, to make the basic case shorter.Huon Wilson-10/+10
2013-11-29libstd: Change `Path::new` to `Path::init`.Patrick Walton-356/+356
2013-11-27Add benchmark tests to path/posixg3xzh-0/+86
I have written some benchmark tests to `push`, `push_many`, `join`, `join_many` and `ends_with_path`.
2013-11-26test: Remove non-procedure uses of `do` from compiletest, libstd tests,Patrick Walton-45/+44
compile-fail tests, run-fail tests, and run-pass tests.
2013-11-26libstd: Remove all non-`proc` uses of `do` from libstdPatrick Walton-3/+1
2013-11-26Removed unneccessary `_iter` suffixes from various APIsMarvin Löbel-67/+67
2013-11-24Remove linked failure from the runtimeAlex Crichton-2/+0
The reasons for doing this are: * The model on which linked failure is based is inherently complex * The implementation is also very complex, and there are few remaining who fully understand the implementation * There are existing race conditions in the core context switching function of the scheduler, and possibly others. * It's unclear whether this model of linked failure maps well to a 1:1 threading model Linked failure is often a desired aspect of tasks, but we would like to take a much more conservative approach in re-implementing linked failure if at all. Closes #8674 Closes #8318 Closes #8863
2013-11-19libstd: Change all uses of `&fn(A)->B` over to `|A|->B` in libstdPatrick Walton-4/+5
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-64/+0
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-69/+0
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-10-22Remove thread-blocking call to `libc::stat` in `Path::stat`Ziad Hatahet-300/+39
Fixes #9958
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-3/+3
Who doesn't like a massive renaming?
2013-10-16path2: Update for privacy changesKevin Ballard-15/+3
Remove redundant `contains_nul` definition. Make `parse_prefix` private.
2013-10-16path2: Update for latest masterKevin Ballard-11/+20
Also fix some issues that crept into earlier commits during the conflict resoution for the rebase.
2013-10-16path2: Remove Path.into_str()Kevin Ballard-19/+0
2013-10-16path2: Remove some API functionsKevin Ballard-631/+81
Delete the following API functions: - set_dirname() - with_dirname() - set_filestem() - with_filestem() - add_extension() - file_path() Also change pop() to return a boolean instead of an owned copy of the old filename.
2013-10-16path2: Update based on more review feedbackKevin Ballard-317/+217
Standardize the is_sep() functions to be the same in both posix and windows, and re-export from path. Update extra::glob to use this. Remove the usage of either, as it's going away. Move the WindowsPath-specific methods out of WindowsPath and make them top-level functions of path::windows instead. This way you cannot accidentally write code that will fail to compile on non-windows architectures without typing ::windows anywhere. Remove GenericPath::from_c_str() and just impl BytesContainer for CString instead. Remove .join_path() and .push_path() and just implement BytesContainer for Path instead. Remove FilenameDisplay and add a boolean flag to Display instead. Remove .each_parent(). It only had one caller, so just inline its definition there.
2013-10-15path2: Remove .with_display_str and friendsKevin Ballard-115/+119
Rewrite these methods as methods on Display and FilenameDisplay. This turns do path.with_display_str |s| { ... } into do path.display().with_str |s| { ... }
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-1017/+918
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Remove Path::normalize()Kevin Ballard-8/+5
There are no clients of this API, so just remove it. Update the module docstring to mention normalization.
2013-10-15path2: Write a few paragraphs of module documentationKevin Ballard-1/+54
2013-10-15path2: Update for loop -> continueKevin Ballard-2/+2
2013-10-15path2: Update asserts for new format!() styleKevin Ballard-31/+36
2013-10-15path2: Replace the path module outrightKevin Ballard-0/+5495
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.