mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.4838: checking for absolute path is not trivial
Problem: Checking for absolute path is not trivial. Solution: Add isabsolutepath(). (closes #10303)
This commit is contained in:
@@ -1416,6 +1416,18 @@ f_isdirectory(typval_T *argvars, typval_T *rettv)
|
||||
rettv->vval.v_number = mch_isdir(tv_get_string(&argvars[0]));
|
||||
}
|
||||
|
||||
/*
|
||||
* "isabsolutepath()" function
|
||||
*/
|
||||
void
|
||||
f_isabsolutepath(typval_T *argvars, typval_T *rettv)
|
||||
{
|
||||
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
|
||||
return;
|
||||
|
||||
rettv->vval.v_number = mch_isFullName(tv_get_string_strict(&argvars[0]));
|
||||
}
|
||||
|
||||
/*
|
||||
* Create the directory in which "dir" is located, and higher levels when
|
||||
* needed.
|
||||
|
Reference in New Issue
Block a user