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

parser: parse_file(path)

This commit is contained in:
Alexander Medvednikov
2020-01-01 10:15:05 +01:00
parent 87cff0386c
commit 96d02849aa
4 changed files with 16 additions and 8 deletions

View File

@ -98,14 +98,14 @@ pub fn create(path string) ?File {
$if linux {
//$if linux_or_macos {
mut fd := 0
println('creat SYS')
//println('creat SYS')
$if macos {
fd = C.syscall(sys_open_nocancel, path.str, 0x601, 0x1b6)
}
$else {
fd = C.syscall(sys_creat, path.str, 511)
}
println('fd=$fd')
//println('fd=$fd')
if fd == -1 {
return error('failed to create file "$path"')
}