1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

os: mkdir syscall on linux

This commit is contained in:
Alexander Medvednikov 2019-11-15 00:15:23 +03:00
parent 2545e1c22c
commit 9499275180
2 changed files with 3 additions and 11 deletions

View File

@ -31,14 +31,8 @@ pub const (
MAX_PATH = 4096
)
/*
struct C.FILE {
}
*/
pub struct File {
cfile voidptr
cfile voidptr // Using void* instead of FILE*
}
struct FileInfo {

View File

@ -57,13 +57,11 @@ pub fn dir_exists(path string) bool {
// mkdir creates a new directory with the specified path.
pub fn mkdir(path string) {
/*
$if linux {
C.syscall(C.SYS_mkdir, path.str)
C.syscall(83, path.str, 511) // sys_mkdir
} $else {
*/
C.mkdir(path.str, 511)// S_IRWXU | S_IRWXG | S_IRWXO
//}
}
}
// exec starts the specified command, waits for it to complete, and returns its output.