Replace path.exists? with file-exists? in C
This commit is contained in:
parent
e2af92b934
commit
5f53326df8
|
@ -350,12 +350,12 @@ static value_t fl_path_cwd(value_t *args, uint32_t nargs)
|
|||
return FL_T;
|
||||
}
|
||||
|
||||
static value_t fl_path_exists(value_t *args, uint32_t nargs)
|
||||
value_t builtin_file_exists(value_t *args, uint32_t nargs)
|
||||
{
|
||||
char *str;
|
||||
|
||||
argcount("path.exists?", nargs, 1);
|
||||
str = tostring(args[0], "path.exists?");
|
||||
argcount("file-exists?", nargs, 1);
|
||||
str = tostring(args[0], "file-exists?");
|
||||
return os_path_exists(str) ? FL_T : FL_F;
|
||||
}
|
||||
|
||||
|
@ -548,8 +548,8 @@ static struct builtinspec builtin_info[] = {
|
|||
{ "atan", fl_atan },
|
||||
|
||||
{ "path.cwd", fl_path_cwd },
|
||||
{ "path.exists?", fl_path_exists },
|
||||
|
||||
{ "path.exists?", builtin_file_exists }, // TODO: remove
|
||||
{ "os.getenv", builtin_get_environment_variable }, // TODO: remove
|
||||
|
||||
{ "help*", builtin_help_star },
|
||||
|
|
|
@ -81,6 +81,8 @@ static struct builtin_procedure builtin_procedures[] = {
|
|||
|
||||
{ "color-name->rgb24", builtin_color_name_to_rgb24, UP_2019 },
|
||||
|
||||
{ "file-exists?", builtin_file_exists, R7RS_FILE | UP_2019 },
|
||||
|
||||
{ "open-directory", builtin_os_open_directory, SRFI_170 | UP_2019 },
|
||||
{ "read-directory", builtin_os_read_directory, SRFI_170 | UP_2019 },
|
||||
{ "close-directory", builtin_os_close_directory, SRFI_170 | UP_2019 },
|
||||
|
|
|
@ -996,6 +996,8 @@ value_t builtin_read_ini_file(value_t *args, uint32_t nargs);
|
|||
|
||||
value_t builtin_color_name_to_rgb24(value_t *args, uint32_t nargs);
|
||||
|
||||
value_t builtin_file_exists(value_t *args, uint32_t nargs);
|
||||
|
||||
value_t builtin_get_environment_variables(value_t *args, uint32_t nargs);
|
||||
value_t builtin_get_environment_variable(value_t *args, uint32_t nargs);
|
||||
value_t builtin_set_environment_variable(value_t *args, uint32_t nargs);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -187,7 +187,6 @@
|
|||
(prog1 (proc f)
|
||||
(io.close f))))
|
||||
|
||||
(define (file-exists? f) (path.exists? f))
|
||||
(define (delete-file name) (void)) ; TODO
|
||||
|
||||
(define assertion-violation
|
||||
|
|
Loading…
Reference in New Issue