Add some filename helpers to os.
This commit is contained in:
@@ -39,6 +39,14 @@ mod libc_constants {
|
|||||||
fn S_IWUSR() -> uint { ret 0x0080u; }
|
fn S_IWUSR() -> uint { ret 0x0080u; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn path_sep() -> str {
|
||||||
|
ret "/";
|
||||||
|
}
|
||||||
|
|
||||||
|
fn exec_suffix() -> str {
|
||||||
|
ret "";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Local Variables:
|
// Local Variables:
|
||||||
// mode: rust;
|
// mode: rust;
|
||||||
|
|||||||
@@ -39,6 +39,14 @@ mod libc_constants {
|
|||||||
fn S_IWUSR() -> uint { ret 0x0200u; }
|
fn S_IWUSR() -> uint { ret 0x0200u; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn path_sep() -> str {
|
||||||
|
ret "/";
|
||||||
|
}
|
||||||
|
|
||||||
|
fn exec_suffix() -> str {
|
||||||
|
ret "";
|
||||||
|
}
|
||||||
|
|
||||||
// Local Variables:
|
// Local Variables:
|
||||||
// mode: rust;
|
// mode: rust;
|
||||||
// fill-column: 78;
|
// fill-column: 78;
|
||||||
|
|||||||
@@ -29,6 +29,15 @@ mod libc_constants {
|
|||||||
fn S_IWUSR() -> uint { ret 0x0080u; } // really _S_IWRITE in win32
|
fn S_IWUSR() -> uint { ret 0x0080u; } // really _S_IWRITE in win32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fn path_sep() -> str {
|
||||||
|
ret "\\";
|
||||||
|
}
|
||||||
|
|
||||||
|
fn exec_suffix() -> str {
|
||||||
|
ret ".exe";
|
||||||
|
}
|
||||||
|
|
||||||
// Local Variables:
|
// Local Variables:
|
||||||
// mode: rust;
|
// mode: rust;
|
||||||
// fill-column: 78;
|
// fill-column: 78;
|
||||||
|
|||||||
Reference in New Issue
Block a user