1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 04:27:45 +00:00

std::path -> std::old_path

This commit is contained in:
Michael Gehring 2015-02-05 23:09:38 +01:00
parent f5246aba3d
commit 5e70473a2b
13 changed files with 13 additions and 13 deletions

View file

@ -1,7 +1,7 @@
#![feature(core, io, os, path)] #![feature(core, io, os, path)]
use std::old_io::{File, Truncate, ReadWrite}; use std::old_io::{File, Truncate, ReadWrite};
use std::os; use std::os;
use std::path::Path; use std::old_path::Path;
static TEMPLATE: &'static str = "\ static TEMPLATE: &'static str = "\
#![feature(os)] #![feature(os)]

View file

@ -2,7 +2,7 @@
use std::old_io::{File, Truncate, Write}; use std::old_io::{File, Truncate, Write};
use std::os; use std::os;
use std::path::Path; use std::old_path::Path;
fn main() { fn main() {
let args = os::args(); let args = os::args();

View file

@ -262,7 +262,7 @@ fn open(path: &str) -> Option<(Box<Reader>, bool)> {
return Some((box stdin as Box<Reader>, interactive)); 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)), Ok(f) => Some((box f as Box<Reader>, false)),
Err(e) => { Err(e) => {
(writeln!(&mut stderr(), "cat: {0}: {1}", path, e.to_string())).unwrap(); (writeln!(&mut stderr(), "cat: {0}: {1}", path, e.to_string())).unwrap();

View file

@ -16,7 +16,7 @@ use std::cmp::Ordering;
use std::old_io::{BufferedReader, IoResult, print}; use std::old_io::{BufferedReader, IoResult, print};
use std::old_io::fs::File; use std::old_io::fs::File;
use std::old_io::stdio::{stdin, StdinReader}; use std::old_io::stdio::{stdin, StdinReader};
use std::path::Path; use std::old_path::Path;
static NAME : &'static str = "comm"; static NAME : &'static str = "comm";
static VERSION : &'static str = "1.0.0"; static VERSION : &'static str = "1.0.0";

View file

@ -53,7 +53,7 @@ directory).", &opts).as_slice());
if !matches.free.is_empty() { if !matches.free.is_empty() {
for path in matches.free.iter() { 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()); let d = std::str::from_utf8(p.dirname());
if d.is_ok() { if d.is_ok() {
print(d.unwrap()); print(d.unwrap());

View file

@ -19,7 +19,7 @@ extern crate time;
use std::old_io::{stderr, fs, FileStat, FileType}; use std::old_io::{stderr, fs, FileStat, FileType};
use std::num::Float; use std::num::Float;
use std::option::Option; use std::option::Option;
use std::path::Path; use std::old_path::Path;
use std::sync::{Arc, Future}; use std::sync::{Arc, Future};
use time::Timespec; use time::Timespec;

View file

@ -18,7 +18,7 @@ use std::char::CharExt;
use std::old_io::{stdin}; use std::old_io::{stdin};
use std::old_io::{BufferedReader, BytesReader}; use std::old_io::{BufferedReader, BytesReader};
use std::old_io::fs::File; use std::old_io::fs::File;
use std::path::Path; use std::old_path::Path;
use std::str::from_utf8; use std::str::from_utf8;
use getopts::{optopt, optflag, getopts, usage}; use getopts::{optopt, optflag, getopts, usage};

View file

@ -13,7 +13,7 @@
extern crate getopts; extern crate getopts;
use std::old_io::fs::link; use std::old_io::fs::link;
use std::path::Path; use std::old_path::Path;
#[path="../common/util.rs"] #[path="../common/util.rs"]
#[macro_use] #[macro_use]

View file

@ -16,7 +16,7 @@ extern crate getopts;
use std::old_io::{BufferedReader, IoResult, fs}; use std::old_io::{BufferedReader, IoResult, fs};
use std::old_io::stdio::stdin_raw; use std::old_io::stdio::stdin_raw;
use std::old_io::fs::PathExtensions; use std::old_io::fs::PathExtensions;
use std::path::GenericPath; use std::old_path::GenericPath;
use getopts::{ use getopts::{
getopts, getopts,
optflag, optflag,

View file

@ -21,7 +21,7 @@ use std::old_io::BufferedReader;
use std::old_io::fs::File; use std::old_io::fs::File;
use std::iter::repeat; use std::iter::repeat;
use std::num::Int; use std::num::Int;
use std::path::Path; use std::old_path::Path;
use getopts::{optopt, optflag, getopts, usage, OptGroup}; use getopts::{optopt, optflag, getopts, usage, OptGroup};
#[path="../common/util.rs"] #[path="../common/util.rs"]

View file

@ -160,7 +160,7 @@ fn open<'a>(path: &str) -> Option<(Box<Reader + 'a>, bool)> {
return Some((Box::new(stdin) as Box<Reader>, interactive)); 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)), Ok(f) => Some((Box::new(f) as Box<Reader>, false)),
Err(e) => { Err(e) => {
show_error!("sort: {0}: {1}", path, e.to_string()); show_error!("sort: {0}: {1}", path, e.to_string());

View file

@ -17,7 +17,7 @@ use std::char::CharExt;
use std::old_io::{stdin, stdout}; use std::old_io::{stdin, stdout};
use std::old_io::{BufferedReader, BytesReader}; use std::old_io::{BufferedReader, BytesReader};
use std::old_io::fs::File; use std::old_io::fs::File;
use std::path::Path; use std::old_path::Path;
use std::str::from_utf8; use std::str::from_utf8;
use getopts::{optopt, optflag, getopts, usage}; use getopts::{optopt, optflag, getopts, usage};
use std::collections::ring_buf::RingBuf; use std::collections::ring_buf::RingBuf;

View file

@ -384,7 +384,7 @@ fn path(path: &[u8], cond: PathCondition) -> bool {
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::{TypeFile, TypeDirectory, TypeBlockSpecial, TypeNamedPipe};
use std::old_io::fs::{stat}; use std::old_io::fs::{stat};
use std::path::{Path}; use std::old_path::{Path};
let path = match Path::new_opt(path) { let path = match Path::new_opt(path) {
Some(p) => p, Some(p) => p,