Files
kOS/library/lib_file_exists.ks
2025-11-19 12:53:09 -05:00

21 lines
467 B
Plaintext

// lib_file_exists.ks is a means of checking for optional dependencies, or checking whether a file exists before attempting to run it.
// Copyright © 2015,2023 KSLib team
// Lic. MIT
@LAZYGLOBAL off.
@CLOBBERBUILTINS off.
function file_exists{
parameter fileName.
local fileList is list().
local found is false.
list files in fileList.
for file in fileList {
if file = fileName {
set found to true.
break.
}
}
return found.
}