1. 11 11月, 2013 1 次提交
  2. 09 11月, 2013 1 次提交
  3. 05 11月, 2013 1 次提交
    • A
      Move io::file to io::fs and fns out of File · 3c3ed149
      Alex Crichton 提交于
      This renames the `file` module to `fs` because that more accurately describes
      its current purpose (manipulating the filesystem, not just files).
      
      Additionally, this adds an UnstableFileStat structure as a nested structure of
      FileStat to signify that the fields should not be depended on. The structure is
      currently flagged with #[unstable], but it's unlikely that it has much meaning.
      
      Closes #10241
      3c3ed149
  4. 04 11月, 2013 2 次提交
    • A
      Fill out the remaining functionality in io::file · f19d0833
      Alex Crichton 提交于
      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
      f19d0833
    • A
      Remove all blocking std::os blocking functions · 9c185101
      Alex Crichton 提交于
      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
      9c185101
  5. 25 10月, 2013 3 次提交
    • A
      Test fixes and merge conflicts · 620ab385
      Alex Crichton 提交于
      620ab385
    • A
      Remove even more of std::io · 61ed2cfb
      Alex Crichton 提交于
      Big fish fried here:
      
          extra::json
          most of the compiler
          extra::io_util removed
          extra::fileinput removed
      
      Fish left to fry
      
          extra::ebml
      61ed2cfb
    • A
      Remove rt::io::support · 9110a38c
      Alex Crichton 提交于
      This removes the PathLike trait associated with this "support module". This is
      yet another "container of bytes" trait, so I didn't want to duplicate what
      already exists throughout libstd. In actuality, we're going to pass of C strings
      to the libuv APIs, so instead the arguments are now bound with the 'ToCStr'
      trait instead.
      
      Additionally, a layer of complexity was removed by immediately converting these
      type-generic parameters into CStrings to get handed off to libuv apis.
      9110a38c
  6. 23 10月, 2013 2 次提交
  7. 22 10月, 2013 2 次提交
  8. 20 10月, 2013 1 次提交
  9. 17 10月, 2013 3 次提交
    • K
      path2: Update for latest master · 6eade9e9
      Kevin Ballard 提交于
      Also fix some issues that crept into earlier commits during the conflict
      resoution for the rebase.
      6eade9e9
    • K
      path2: Remove some API functions · 0c7e8f7a
      Kevin Ballard 提交于
      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.
      0c7e8f7a
    • K
      path2: Update based on more review feedback · bab7eb20
      Kevin Ballard 提交于
      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.
      bab7eb20
  10. 16 10月, 2013 2 次提交
    • K
      path2: Adjust the API to remove all the _str mutation methods · d6d9b926
      Kevin Ballard 提交于
      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.
      d6d9b926
    • K
      path2: Replace the path module outright · 73d3d00e
      Kevin Ballard 提交于
      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.
      73d3d00e
  11. 14 10月, 2013 1 次提交
  12. 11 10月, 2013 1 次提交
  13. 09 10月, 2013 1 次提交
  14. 01 10月, 2013 2 次提交
  15. 30 9月, 2013 1 次提交
  16. 22 9月, 2013 1 次提交
    • H
      std: merge rand::{Rng,RngUtil} with default methods. · fb923c7d
      Huon Wilson 提交于
      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.
      fb923c7d
  17. 19 9月, 2013 1 次提交
  18. 18 9月, 2013 2 次提交
  19. 17 9月, 2013 4 次提交
  20. 16 9月, 2013 1 次提交
    • K
      std::os: Use unicode for last_os_error() on Win32 · f3c88825
      klutzy 提交于
      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. :)
      f3c88825
  21. 15 9月, 2013 1 次提交
  22. 13 9月, 2013 3 次提交
  23. 09 9月, 2013 1 次提交
    • D
      rename `std::iterator` to `std::iter` · 6919cf5f
      Daniel Micay 提交于
      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.
      6919cf5f
  24. 06 9月, 2013 1 次提交
  25. 05 9月, 2013 1 次提交