mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
std::path -> std::old_path
This commit is contained in:
parent
f5246aba3d
commit
5e70473a2b
13 changed files with 13 additions and 13 deletions
|
@ -1,7 +1,7 @@
|
|||
#![feature(core, io, os, path)]
|
||||
use std::old_io::{File, Truncate, ReadWrite};
|
||||
use std::os;
|
||||
use std::path::Path;
|
||||
use std::old_path::Path;
|
||||
|
||||
static TEMPLATE: &'static str = "\
|
||||
#![feature(os)]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
use std::old_io::{File, Truncate, Write};
|
||||
use std::os;
|
||||
use std::path::Path;
|
||||
use std::old_path::Path;
|
||||
|
||||
fn main() {
|
||||
let args = os::args();
|
||||
|
|
|
@ -262,7 +262,7 @@ fn open(path: &str) -> Option<(Box<Reader>, bool)> {
|
|||
return Some((box stdin as Box<Reader>, interactive));
|
||||
}
|
||||
|
||||
match File::open(&std::path::Path::new(path)) {
|
||||
match File::open(&std::old_path::Path::new(path)) {
|
||||
Ok(f) => Some((box f as Box<Reader>, false)),
|
||||
Err(e) => {
|
||||
(writeln!(&mut stderr(), "cat: {0}: {1}", path, e.to_string())).unwrap();
|
||||
|
|
|
@ -16,7 +16,7 @@ use std::cmp::Ordering;
|
|||
use std::old_io::{BufferedReader, IoResult, print};
|
||||
use std::old_io::fs::File;
|
||||
use std::old_io::stdio::{stdin, StdinReader};
|
||||
use std::path::Path;
|
||||
use std::old_path::Path;
|
||||
|
||||
static NAME : &'static str = "comm";
|
||||
static VERSION : &'static str = "1.0.0";
|
||||
|
|
|
@ -53,7 +53,7 @@ directory).", &opts).as_slice());
|
|||
|
||||
if !matches.free.is_empty() {
|
||||
for path in matches.free.iter() {
|
||||
let p = std::path::Path::new(path.clone());
|
||||
let p = std::old_path::Path::new(path.clone());
|
||||
let d = std::str::from_utf8(p.dirname());
|
||||
if d.is_ok() {
|
||||
print(d.unwrap());
|
||||
|
|
|
@ -19,7 +19,7 @@ extern crate time;
|
|||
use std::old_io::{stderr, fs, FileStat, FileType};
|
||||
use std::num::Float;
|
||||
use std::option::Option;
|
||||
use std::path::Path;
|
||||
use std::old_path::Path;
|
||||
use std::sync::{Arc, Future};
|
||||
use time::Timespec;
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ use std::char::CharExt;
|
|||
use std::old_io::{stdin};
|
||||
use std::old_io::{BufferedReader, BytesReader};
|
||||
use std::old_io::fs::File;
|
||||
use std::path::Path;
|
||||
use std::old_path::Path;
|
||||
use std::str::from_utf8;
|
||||
use getopts::{optopt, optflag, getopts, usage};
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
extern crate getopts;
|
||||
|
||||
use std::old_io::fs::link;
|
||||
use std::path::Path;
|
||||
use std::old_path::Path;
|
||||
|
||||
#[path="../common/util.rs"]
|
||||
#[macro_use]
|
||||
|
|
|
@ -16,7 +16,7 @@ extern crate getopts;
|
|||
use std::old_io::{BufferedReader, IoResult, fs};
|
||||
use std::old_io::stdio::stdin_raw;
|
||||
use std::old_io::fs::PathExtensions;
|
||||
use std::path::GenericPath;
|
||||
use std::old_path::GenericPath;
|
||||
use getopts::{
|
||||
getopts,
|
||||
optflag,
|
||||
|
|
|
@ -21,7 +21,7 @@ use std::old_io::BufferedReader;
|
|||
use std::old_io::fs::File;
|
||||
use std::iter::repeat;
|
||||
use std::num::Int;
|
||||
use std::path::Path;
|
||||
use std::old_path::Path;
|
||||
use getopts::{optopt, optflag, getopts, usage, OptGroup};
|
||||
|
||||
#[path="../common/util.rs"]
|
||||
|
|
|
@ -160,7 +160,7 @@ fn open<'a>(path: &str) -> Option<(Box<Reader + 'a>, bool)> {
|
|||
return Some((Box::new(stdin) as Box<Reader>, interactive));
|
||||
}
|
||||
|
||||
match File::open(&std::path::Path::new(path)) {
|
||||
match File::open(&std::old_path::Path::new(path)) {
|
||||
Ok(f) => Some((Box::new(f) as Box<Reader>, false)),
|
||||
Err(e) => {
|
||||
show_error!("sort: {0}: {1}", path, e.to_string());
|
||||
|
|
|
@ -17,7 +17,7 @@ use std::char::CharExt;
|
|||
use std::old_io::{stdin, stdout};
|
||||
use std::old_io::{BufferedReader, BytesReader};
|
||||
use std::old_io::fs::File;
|
||||
use std::path::Path;
|
||||
use std::old_path::Path;
|
||||
use std::str::from_utf8;
|
||||
use getopts::{optopt, optflag, getopts, usage};
|
||||
use std::collections::ring_buf::RingBuf;
|
||||
|
|
|
@ -384,7 +384,7 @@ fn path(path: &[u8], cond: PathCondition) -> bool {
|
|||
fn path(path: &[u8], cond: PathCondition) -> bool {
|
||||
use std::old_io::{TypeFile, TypeDirectory, TypeBlockSpecial, TypeNamedPipe};
|
||||
use std::old_io::fs::{stat};
|
||||
use std::path::{Path};
|
||||
use std::old_path::{Path};
|
||||
|
||||
let path = match Path::new_opt(path) {
|
||||
Some(p) => p,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue