**Use case**

#18842 

**Describe the solution you'd like**

`SELECT file('nonexisting')` - throws exception;
`SELECT file('nonexisting', '')` - returns empty string;
`SELECT file('nonexisting', NULL)` - returns NULL.

std::string user_files_absolute_path_string = user_files_absolute_path.string();
        
        bool need_check = getContext()->getApplicationType() != Context::ApplicationType::LOCAL;
        for (size_t row = 0; row < input_rows_count; ++row)
        {
            std::string_view filename = column_src->getDataAt(row).toView();
            fs::path file_path(filename.data(), filename.data() + filename.size());
            if (file_path.is_relative())
                file_path = user_files_absolute_path / file_path;
            
            
            file_path = fs::absolute(file_path).lexically_normal();
            if (need_check && file_path.string().find(user_files_absolute_path_string) != 0)
                throw Exception(ErrorCodes::DATABASE_ACCESS_DENIED, "File is not inside {}", user_files_absolute_path.string());
            ReadBufferFromFile in(file_path);
            WriteBufferFromVector out(res_chars, AppendModeTag{});
            copyData(in, out);
            out.finalize();
            res_chars.push_back(0);
            res_offsets[row] = res_chars.size();
        }
        return result;
    }
};
REGISTER_FUNCTION(File)
{
    factory.registerFunction<FunctionFile>();
}
}