Go to the source code of this file.
Helper function for input implementation use; ensures that file is open with relevant access mode. This is typically called from input_impl::open() and such.
- Parameters
-
p_file | File object pointer to process. If passed pointer is non-null, the function does nothing and always succeeds; otherwise it attempts to open the file using filesystem API methods. |
p_path | Path to the file. |
p_reason | Type of input operation requested. See: input_impl::open() parameters. |
p_abort | abort_callback object signaling user aborting the operation. |
Definition at line 231 of file input.cpp.
239 filesystem::g_open(p_file,p_path,filesystem::open_mode_read,p_abort);
242 filesystem::g_open(p_file,p_path,filesystem::open_mode_write_existing,p_abort);
246 p_file->reopen(p_abort);
248 }
PFC_NORETURN void SHARED_EXPORT uBugCheck()
Definition at line 41 of file input.cpp.
46 if (filesystem::g_get_interface(fs,p_path)) {
47 if (fs->supports_content_types()) {
48 fs->open(p_file,p_path,p_open_mode,p_abort);
56 if (p_file->get_content_type(content_type))
65 if (p_from_redirect && p_service->is_redirect())
throw exception_io_unsupported_format();
69 throw exception_io_unsupported_format();
static bool g_find_service_by_content_type(service_ptr_t< input_entry > &p_out, const char *p_content_type)
static bool g_find_service_by_path(service_ptr_t< input_entry > &p_out, const char *p_path)
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.