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:
@ -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"')
|
||||
}
|
||||
|
Reference in New Issue
Block a user