mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: filename => file_name
This commit is contained in:
@@ -2481,7 +2481,7 @@ struct IndexConfig {
|
||||
|
||||
// for debugging only
|
||||
fn (p &Parser) fileis(s string) bool {
|
||||
return os.filename(p.scanner.file_path).contains(s)
|
||||
return os.file_name(p.scanner.file_path).contains(s)
|
||||
}
|
||||
|
||||
// in and dot have higher priority than `!`
|
||||
|
@@ -54,7 +54,7 @@ fn (v &V) generate_hotcode_reloading_main_caller() {
|
||||
// We are in live code reload mode, so start the .so loader in the background
|
||||
mut cgen := v.cgen
|
||||
cgen.genln('')
|
||||
file_base := os.filename(v.pref.path).replace('.v', '')
|
||||
file_base := os.file_name(v.pref.path).replace('.v', '')
|
||||
if v.pref.os != .windows {
|
||||
// unix:
|
||||
so_name := file_base + '.so'
|
||||
@@ -79,7 +79,7 @@ fn (v &V) generate_hot_reload_code() {
|
||||
// Hot code reloading
|
||||
if v.pref.is_live {
|
||||
mut file := os.realpath(v.pref.path)
|
||||
file_base := os.filename(file).replace('.v', '')
|
||||
file_base := os.file_name(file).replace('.v', '')
|
||||
so_name := file_base + '.so'
|
||||
// Need to build .so file before building the live application
|
||||
// The live app needs to load this .so file on initialization.
|
||||
|
@@ -54,7 +54,7 @@ pub fn run_repl_file(wd string, vexec string, file string) ?string {
|
||||
input := content.all_before('===output===\n')
|
||||
output := content.all_after('===output===\n')
|
||||
|
||||
fname := os.filename( file )
|
||||
fname := os.file_name( file )
|
||||
|
||||
input_temporary_filename := os.realpath(os.join_path( wd, 'input_temporary_filename.txt'))
|
||||
os.write_file(input_temporary_filename, input)
|
||||
|
@@ -17,5 +17,5 @@ fn get_vtmp_folder() string {
|
||||
|
||||
fn get_vtmp_filename(base_file_name string, postfix string) string {
|
||||
vtmp := get_vtmp_folder()
|
||||
return os.realpath(os.join_path(vtmp, os.filename(os.realpath(base_file_name)) + postfix))
|
||||
return os.realpath(os.join_path(vtmp, os.file_name(os.realpath(base_file_name)) + postfix))
|
||||
}
|
||||
|
Reference in New Issue
Block a user