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

os: replace dir_exists with is_dir; file_exists() => exists()

This commit is contained in:
Alexander Medvednikov
2019-12-04 23:03:12 +03:00
parent fb237b9e53
commit a57e29dfc5
28 changed files with 116 additions and 98 deletions

View File

@@ -9,7 +9,7 @@ fn main() {
exe := os.executable()
dir := os.dir(exe)
vdir := os.dir(os.dir(dir))
if !os.file_exists('$vdir/v') && !os.dir_exists('$vdir/vlib') {
if !os.exists('$vdir/v') && !os.is_dir('$vdir/vlib') {
println('fast.html generator needs to be located in `v/tools/fast/`')
}
println('fast.html generator\n')
@@ -18,7 +18,7 @@ fn main() {
exec('git pull --rebase')
mut commit_hash := exec('git rev-parse HEAD')
commit_hash = commit_hash[..7]
if !os.file_exists('table.html') {
if !os.exists('table.html') {
os.create('table.html') or { panic(err) }
}
mut table := os.read_file('table.html') or { panic(err) }