Add some filename helpers to os.

This commit is contained in:
Graydon Hoare 2010-10-22 11:46:33 -07:00
parent 05c9d885dd
commit dd0d255737
3 changed files with 25 additions and 0 deletions

View File

@ -39,6 +39,14 @@ mod libc_constants {
fn S_IWUSR() -> uint { ret 0x0080u; }
}
fn path_sep() -> str {
ret "/";
}
fn exec_suffix() -> str {
ret "";
}
// Local Variables:
// mode: rust;

View File

@ -39,6 +39,14 @@ mod libc_constants {
fn S_IWUSR() -> uint { ret 0x0200u; }
}
fn path_sep() -> str {
ret "/";
}
fn exec_suffix() -> str {
ret "";
}
// Local Variables:
// mode: rust;
// fill-column: 78;

View File

@ -29,6 +29,15 @@ mod libc_constants {
fn S_IWUSR() -> uint { ret 0x0080u; } // really _S_IWRITE in win32
}
fn path_sep() -> str {
ret "\\";
}
fn exec_suffix() -> str {
ret ".exe";
}
// Local Variables:
// mode: rust;
// fill-column: 78;