foobar2000 SDK
2015-08-03
|
#include <filesystem.h>
Public Types | |
enum | t_open_mode { open_mode_read, open_mode_write_existing, open_mode_write_new } |
Public Types inherited from service_base | |
typedef service_base | t_interface |
Public Member Functions | |
void | copy_directory (const char *p_src, const char *p_dst, abort_callback &p_abort) |
virtual void | create_directory (const char *p_path, abort_callback &p_abort)=0 |
virtual bool | get_canonical_path (const char *p_path, pfc::string_base &p_out)=0 |
virtual bool | get_display_path (const char *p_path, pfc::string_base &p_out)=0 |
virtual void | get_stats (const char *p_path, t_filestats &p_stats, bool &p_is_writeable, abort_callback &p_abort)=0 |
virtual bool | is_our_path (const char *p_path)=0 |
virtual bool | is_remote (const char *p_src)=0 |
virtual void | list_directory (const char *p_path, directory_callback &p_out, abort_callback &p_abort)=0 |
virtual void | move (const char *p_src, const char *p_dst, abort_callback &p_abort)=0 |
virtual void | open (service_ptr_t< file > &p_out, const char *p_path, t_open_mode p_mode, abort_callback &p_abort)=0 |
virtual bool | relative_path_create (const char *file_path, const char *playlist_path, pfc::string_base &out) |
virtual bool | relative_path_parse (const char *relative_path, const char *playlist_path, pfc::string_base &out) |
virtual void | remove (const char *p_path, abort_callback &p_abort)=0 |
void | remove_directory_content (const char *path, abort_callback &abort) |
void | remove_object_recur (const char *path, abort_callback &abort) |
virtual bool | supports_content_types ()=0 |
Public Member Functions inherited from service_base | |
template<typename outPtr_t > | |
bool | cast (outPtr_t &outPtr) |
virtual int | service_add_ref ()=0 throw () |
virtual bool | service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid) |
template<class T > | |
bool | service_query_t (service_ptr_t< T > &p_out) |
virtual int | service_release ()=0 throw () |
Static Public Member Functions | |
static void | g_copy (const char *p_src, const char *p_dst, abort_callback &p_abort) |
static void | g_copy_directory (const char *p_src, const char *p_dst, abort_callback &p_abort) |
static void | g_copy_timeout (const char *p_src, const char *p_dst, double p_timeout, abort_callback &p_abort) |
static void | g_create_directory (const char *p_path, abort_callback &p_abort) |
static bool | g_exists (const char *p_path, abort_callback &p_abort) |
static bool | g_exists_writeable (const char *p_path, abort_callback &p_abort) |
static void | g_get_canonical_path (const char *path, pfc::string_base &out) |
static void | g_get_display_path (const char *path, pfc::string_base &out) |
static bool | g_get_interface (service_ptr_t< filesystem > &p_out, const char *path) |
static filesystem::ptr | g_get_interface (const char *path) |
static bool | g_get_native_path (const char *path, pfc::string_base &out) |
static void | g_get_stats (const char *p_path, t_filestats &p_stats, bool &p_is_writeable, abort_callback &p_abort) |
static bool | g_is_empty_directory (const char *path, abort_callback &p_abort) |
static bool | g_is_recognized_and_remote (const char *p_path) |
static bool | g_is_recognized_path (const char *p_path) |
static bool | g_is_remote (const char *p_path) |
static bool | g_is_remote_or_unrecognized (const char *p_path) |
static bool | g_is_remote_safe (const char *p_path) |
static bool | g_is_valid_directory (const char *path, abort_callback &p_abort) |
static void | g_link (const char *p_src, const char *p_dst, abort_callback &p_abort) |
static void | g_link_timeout (const char *p_src, const char *p_dst, double p_timeout, abort_callback &p_abort) |
static void | g_list_directory (const char *p_path, directory_callback &p_out, abort_callback &p_abort) |
static void | g_move (const char *p_src, const char *p_dst, abort_callback &p_abort) |
static void | g_move_timeout (const char *p_src, const char *p_dst, double p_timeout, abort_callback &p_abort) |
static void | g_open (service_ptr_t< file > &p_out, const char *p_path, t_open_mode p_mode, abort_callback &p_abort) |
static void | g_open_precache (service_ptr_t< file > &p_out, const char *path, abort_callback &p_abort) |
static void | g_open_read (service_ptr_t< file > &p_out, const char *path, abort_callback &p_abort) |
static void | g_open_temp (service_ptr_t< file > &p_out, abort_callback &p_abort) |
static void | g_open_tempmem (service_ptr_t< file > &p_out, abort_callback &p_abort) |
static file::ptr | g_open_tempmem () |
static void | g_open_timeout (service_ptr_t< file > &p_out, const char *p_path, t_open_mode p_mode, double p_timeout, abort_callback &p_abort) |
static void | g_open_write_new (service_ptr_t< file > &p_out, const char *p_path, abort_callback &p_abort) |
static bool | g_relative_path_create (const char *p_file_path, const char *p_playlist_path, pfc::string_base &out) |
static bool | g_relative_path_parse (const char *p_relative_path, const char *p_playlist_path, pfc::string_base &out) |
static void | g_remove (const char *p_path, abort_callback &p_abort) |
static void | g_remove_object_recur (const char *path, abort_callback &abort) |
static void | g_remove_object_recur_timeout (const char *path, double timeout, abort_callback &abort) |
static void | g_remove_timeout (const char *p_path, double p_timeout, abort_callback &p_abort) |
static FILE * | streamio_open (const char *p_path, const char *p_flags) |
Private Member Functions | |
FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT (filesystem) | |
Additional Inherited Members | |
Protected Member Functions inherited from service_base | |
service_base () | |
~service_base () | |
Entrypoint service for all filesystem operations.
Implementation: standard implementations for local filesystem etc are provided by core.
Instantiation: use static helper functions rather than calling filesystem interface methods directly, e.g. filesystem::g_open() to open a file.
Definition at line 383 of file filesystem.h.
Enumeration specifying how to open a file. See: filesystem::open(), filesystem::g_open().
Definition at line 387 of file filesystem.h.
void filesystem::copy_directory | ( | const char * | p_src, |
const char * | p_dst, | ||
abort_callback & | p_abort | ||
) |
Definition at line 553 of file filesystem.cpp.
|
pure virtual |
Creates a directory.
Implemented in foobar2000_io::archive_impl.
|
private |
|
static |
Definition at line 570 of file filesystem.cpp.
|
static |
Definition at line 561 of file filesystem.cpp.
|
static |
Definition at line 179 of file filesystem.cpp.
|
static |
Definition at line 183 of file filesystem.cpp.
|
static |
Definition at line 147 of file filesystem.cpp.
|
static |
Definition at line 157 of file filesystem.cpp.
|
static |
Definition at line 74 of file filesystem.cpp.
|
static |
Definition at line 87 of file filesystem.cpp.
|
static |
Definition at line 121 of file filesystem.cpp.
|
static |
Definition at line 115 of file filesystem.cpp.
|
static |
Extracts the native filesystem path, sets out to the input path if native path cannot be extracted so the output is always set.
Definition at line 103 of file filesystem.cpp.
|
static |
Definition at line 659 of file filesystem.cpp.
|
static |
Definition at line 471 of file filesystem.cpp.
|
static |
Definition at line 258 of file filesystem.cpp.
|
static |
Definition at line 847 of file filesystem.cpp.
|
static |
Definition at line 254 of file filesystem.cpp.
|
static |
Definition at line 264 of file filesystem.cpp.
|
inlinestatic |
Definition at line 431 of file filesystem.h.
|
static |
Definition at line 480 of file filesystem.cpp.
|
static |
Definition at line 200 of file filesystem.cpp.
|
static |
Definition at line 205 of file filesystem.cpp.
|
static |
Definition at line 210 of file filesystem.cpp.
|
static |
Moves file from one path to another.
Definition at line 188 of file filesystem.cpp.
|
static |
Attempts to move file from one path to another; if the operation fails with a sharing violation error, keeps retrying (with short sleep period between retries) for specified amount of time.
Definition at line 175 of file filesystem.cpp.
|
static |
Opens file at specified path, with specified access privileges.
Definition at line 136 of file filesystem.cpp.
|
static |
Definition at line 248 of file filesystem.cpp.
|
inlinestatic |
Definition at line 440 of file filesystem.h.
|
static |
Definition at line 638 of file filesystem.cpp.
|
static |
Definition at line 642 of file filesystem.cpp.
|
static |
Definition at line 646 of file filesystem.cpp.
|
static |
Attempts to open file at specified path; if the operation fails with sharing violation error, keeps retrying (with short sleep period between retries) for specified amount of time.
Definition at line 143 of file filesystem.cpp.
|
static |
Definition at line 622 of file filesystem.cpp.
|
static |
Definition at line 270 of file filesystem.cpp.
|
static |
Definition at line 282 of file filesystem.cpp.
|
static |
Removes file at specified path.
Definition at line 167 of file filesystem.cpp.
|
static |
Definition at line 1003 of file filesystem.cpp.
|
static |
Definition at line 999 of file filesystem.cpp.
|
static |
Attempts to remove file at specified path; if the operation fails with a sharing violation error, keeps retrying (with short sleep period between retries) for specified amount of time.
Definition at line 171 of file filesystem.cpp.
|
pure virtual |
Implemented in foobar2000_io::archive_impl.
|
pure virtual |
Implemented in foobar2000_io::archive_impl.
|
pure virtual |
Retrieves stats of a file at specified path.
Implemented in foobar2000_io::archive_impl.
|
pure virtual |
Implemented in foobar2000_io::archive_impl.
|
pure virtual |
Queries whether a file at specified path belonging to this filesystem is a remove object or not.
Implemented in foobar2000_io::archive_impl.
|
pure virtual |
Implemented in foobar2000_io::archive_impl.
|
pure virtual |
Implemented in foobar2000_io::archive_impl.
|
pure virtual |
Implemented in foobar2000_io::archive_impl.
|
inlinevirtual |
Reimplemented in foobar2000_io::archive_impl.
Definition at line 409 of file filesystem.h.
|
inlinevirtual |
Reimplemented in foobar2000_io::archive_impl.
Definition at line 410 of file filesystem.h.
|
pure virtual |
Implemented in foobar2000_io::archive_impl.
void filesystem::remove_directory_content | ( | const char * | path, |
abort_callback & | abort | ||
) |
Definition at line 978 of file filesystem.cpp.
void filesystem::remove_object_recur | ( | const char * | path, |
abort_callback & | abort | ||
) |
Definition at line 992 of file filesystem.cpp.
|
static |
If for some bloody reason you ever need stream io compatibility, use this, INSTEAD of calling fopen() on the path string you've got; will only work with file:// (and not with http://, unpack:// or whatever)
Definition at line 435 of file filesystem.cpp.
|
pure virtual |
Hint; returns whether this filesystem supports mime types.
When this returns false, all file::get_content_type() calls on files opened thru this filesystem implementation will return false; otherwise, file::get_content_type() calls may return true depending on the file.