mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Removed # and added new error message case
This commit is contained in:

committed by
Alex Medvednikov

parent
ad5e1fd8d4
commit
13f5429dae
11
os/os.v
11
os/os.v
@ -332,13 +332,10 @@ pub fn file_exists(path string) bool {
|
||||
}
|
||||
|
||||
pub fn dir_exists(path string) bool {
|
||||
res := false
|
||||
if file_exists(path) {
|
||||
# DIR *dir = opendir(path.str);
|
||||
# res = dir != NULL;
|
||||
if res {
|
||||
# closedir(dir);
|
||||
}
|
||||
dir := C.opendir(path.cstr())
|
||||
res := !isnil(dir)
|
||||
if res {
|
||||
C.closedir(dir)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
Reference in New Issue
Block a user