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:
parent
2545e1c22c
commit
9499275180
@ -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 {
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user