#include <filesystem.h>
Public Types | |
| enum | t_open_mode { open_mode_read, open_mode_write_existing, open_mode_write_new } |
Enumeration specifying how to open a file. See: filesystem::open(), filesystem::g_open(). More... | |
| typedef filesystem | t_interface_entrypoint |
| typedef filesystem | t_interface |
| typedef service_base | t_interface_parent |
Public Member Functions | |
| virtual bool | get_canonical_path (const char *p_path, pfc::string_base &p_out)=0 |
| virtual bool | is_our_path (const char *p_path)=0 |
| virtual bool | get_display_path (const char *p_path, pfc::string_base &p_out)=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 void | remove (const char *p_path, abort_callback &p_abort)=0 |
| virtual void | move (const char *p_src, const char *p_dst, abort_callback &p_abort)=0 |
| virtual bool | is_remote (const char *p_src)=0 |
| Queries whether a file at specified path belonging to this filesystem is a remove object or not. | |
| virtual void | get_stats (const char *p_path, t_filestats &p_stats, bool &p_is_writeable, abort_callback &p_abort)=0 |
| Retrieves stats of a file at specified path. | |
| 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 | create_directory (const char *p_path, abort_callback &p_abort)=0 |
| Creates a directory. | |
| virtual void | list_directory (const char *p_path, directory_callback &p_out, abort_callback &p_abort)=0 |
| virtual bool | supports_content_types ()=0 |
Static Public Member Functions | |
| 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 bool | g_is_remote (const char *p_path) |
| static bool | g_is_recognized_and_remote (const char *p_path) |
| static bool | g_is_remote_safe (const char *p_path) |
| static bool | g_is_remote_or_unrecognized (const char *p_path) |
| static bool | g_is_recognized_path (const char *p_path) |
| static void | g_open (service_ptr_t< file > &p_out, const char *p_path, t_open_mode p_mode, abort_callback &p_abort) |
| Opens file at specified path, with specified access privileges. | |
| 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) |
| 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. | |
| static void | g_open_write_new (service_ptr_t< file > &p_out, const char *p_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_precache (service_ptr_t< file > &p_out, const char *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_remove (const char *p_path, abort_callback &p_abort) |
| Removes file at specified path. | |
| static void | g_remove_timeout (const char *p_path, double p_timeout, abort_callback &p_abort) |
| 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. | |
| static void | g_move (const char *p_src, const char *p_dst, abort_callback &p_abort) |
| Moves file from one path to another. | |
| static void | g_move_timeout (const char *p_src, const char *p_dst, double p_timeout, abort_callback &p_abort) |
| 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. | |
| static void | g_copy (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_copy_directory (const char *p_src, const char *p_dst, abort_callback &p_abort) |
| static void | g_get_stats (const char *p_path, t_filestats &p_stats, bool &p_is_writeable, 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_create_directory (const char *p_path, abort_callback &p_abort) |
| static FILE * | streamio_open (const char *p_path, const char *p_flags) |
| 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). | |
| 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 void | g_list_directory (const char *p_path, directory_callback &p_out, abort_callback &p_abort) |
| static bool | g_is_valid_directory (const char *path, abort_callback &p_abort) |
| static bool | g_is_empty_directory (const char *path, abort_callback &p_abort) |
Static Public Attributes | |
| static const GUID | class_guid |
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.
Reimplemented from service_base.
Reimplemented in foobar2000_io::archive.
Reimplemented in foobar2000_io::archive.
Enumeration specifying how to open a file. See: filesystem::open(), filesystem::g_open().
| virtual void foobar2000_io::filesystem::create_directory | ( | const char * | p_path, | |
| abort_callback & | p_abort | |||
| ) | [pure virtual] |
Creates a directory.
| static void foobar2000_io::filesystem::g_copy | ( | const char * | p_src, | |
| const char * | p_dst, | |||
| abort_callback & | p_abort | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_copy_directory | ( | const char * | p_src, | |
| const char * | p_dst, | |||
| abort_callback & | p_abort | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_copy_timeout | ( | const char * | p_src, | |
| const char * | p_dst, | |||
| double | p_timeout, | |||
| abort_callback & | p_abort | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_create_directory | ( | const char * | p_path, | |
| abort_callback & | p_abort | |||
| ) | [static] |
| static bool foobar2000_io::filesystem::g_exists | ( | const char * | p_path, | |
| abort_callback & | p_abort | |||
| ) | [static] |
| static bool foobar2000_io::filesystem::g_exists_writeable | ( | const char * | p_path, | |
| abort_callback & | p_abort | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_get_canonical_path | ( | const char * | path, | |
| pfc::string_base & | out | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_get_display_path | ( | const char * | path, | |
| pfc::string_base & | out | |||
| ) | [static] |
| static bool foobar2000_io::filesystem::g_get_interface | ( | service_ptr_t< filesystem > & | p_out, | |
| const char * | path | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_get_stats | ( | const char * | p_path, | |
| t_filestats & | p_stats, | |||
| bool & | p_is_writeable, | |||
| abort_callback & | p_abort | |||
| ) | [static] |
| static bool foobar2000_io::filesystem::g_is_empty_directory | ( | const char * | path, | |
| abort_callback & | p_abort | |||
| ) | [static] |
| static bool foobar2000_io::filesystem::g_is_recognized_and_remote | ( | const char * | p_path | ) | [static] |
| static bool foobar2000_io::filesystem::g_is_recognized_path | ( | const char * | p_path | ) | [static] |
| static bool foobar2000_io::filesystem::g_is_remote | ( | const char * | p_path | ) | [static] |
| static bool foobar2000_io::filesystem::g_is_remote_or_unrecognized | ( | const char * | p_path | ) | [static] |
| static bool foobar2000_io::filesystem::g_is_remote_safe | ( | const char * | p_path | ) | [inline, static] |
| static bool foobar2000_io::filesystem::g_is_valid_directory | ( | const char * | path, | |
| abort_callback & | p_abort | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_list_directory | ( | const char * | p_path, | |
| directory_callback & | p_out, | |||
| abort_callback & | p_abort | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_move | ( | const char * | p_src, | |
| const char * | p_dst, | |||
| abort_callback & | p_abort | |||
| ) | [static] |
Moves file from one path to another.
| static void foobar2000_io::filesystem::g_move_timeout | ( | const char * | p_src, | |
| const char * | p_dst, | |||
| double | p_timeout, | |||
| abort_callback & | p_abort | |||
| ) | [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.
| static void foobar2000_io::filesystem::g_open | ( | service_ptr_t< file > & | p_out, | |
| const char * | p_path, | |||
| t_open_mode | p_mode, | |||
| abort_callback & | p_abort | |||
| ) | [static] |
Opens file at specified path, with specified access privileges.
| static void foobar2000_io::filesystem::g_open_precache | ( | service_ptr_t< file > & | p_out, | |
| const char * | path, | |||
| abort_callback & | p_abort | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_open_read | ( | service_ptr_t< file > & | p_out, | |
| const char * | path, | |||
| abort_callback & | p_abort | |||
| ) | [inline, static] |
| static void foobar2000_io::filesystem::g_open_temp | ( | service_ptr_t< file > & | p_out, | |
| abort_callback & | p_abort | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_open_tempmem | ( | service_ptr_t< file > & | p_out, | |
| abort_callback & | p_abort | |||
| ) | [static] |
| static void foobar2000_io::filesystem::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] |
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.
| static void foobar2000_io::filesystem::g_open_write_new | ( | service_ptr_t< file > & | p_out, | |
| const char * | p_path, | |||
| abort_callback & | p_abort | |||
| ) | [static] |
| static bool foobar2000_io::filesystem::g_relative_path_create | ( | const char * | p_file_path, | |
| const char * | p_playlist_path, | |||
| pfc::string_base & | out | |||
| ) | [static] |
| static bool foobar2000_io::filesystem::g_relative_path_parse | ( | const char * | p_relative_path, | |
| const char * | p_playlist_path, | |||
| pfc::string_base & | out | |||
| ) | [static] |
| static void foobar2000_io::filesystem::g_remove | ( | const char * | p_path, | |
| abort_callback & | p_abort | |||
| ) | [static] |
Removes file at specified path.
| static void foobar2000_io::filesystem::g_remove_timeout | ( | const char * | p_path, | |
| double | p_timeout, | |||
| abort_callback & | p_abort | |||
| ) | [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.
| virtual bool foobar2000_io::filesystem::get_canonical_path | ( | const char * | p_path, | |
| pfc::string_base & | p_out | |||
| ) | [pure virtual] |
| virtual bool foobar2000_io::filesystem::get_display_path | ( | const char * | p_path, | |
| pfc::string_base & | p_out | |||
| ) | [pure virtual] |
| virtual void foobar2000_io::filesystem::get_stats | ( | const char * | p_path, | |
| t_filestats & | p_stats, | |||
| bool & | p_is_writeable, | |||
| abort_callback & | p_abort | |||
| ) | [pure virtual] |
Retrieves stats of a file at specified path.
| virtual bool foobar2000_io::filesystem::is_our_path | ( | const char * | p_path | ) | [pure virtual] |
| virtual bool foobar2000_io::filesystem::is_remote | ( | const char * | p_src | ) | [pure virtual] |
Queries whether a file at specified path belonging to this filesystem is a remove object or not.
| virtual void foobar2000_io::filesystem::list_directory | ( | const char * | p_path, | |
| directory_callback & | p_out, | |||
| abort_callback & | p_abort | |||
| ) | [pure virtual] |
| virtual void foobar2000_io::filesystem::move | ( | const char * | p_src, | |
| const char * | p_dst, | |||
| abort_callback & | p_abort | |||
| ) | [pure virtual] |
| virtual void foobar2000_io::filesystem::open | ( | service_ptr_t< file > & | p_out, | |
| const char * | p_path, | |||
| t_open_mode | p_mode, | |||
| abort_callback & | p_abort | |||
| ) | [pure virtual] |
| virtual bool foobar2000_io::filesystem::relative_path_create | ( | const char * | file_path, | |
| const char * | playlist_path, | |||
| pfc::string_base & | out | |||
| ) | [inline, virtual] |
| virtual bool foobar2000_io::filesystem::relative_path_parse | ( | const char * | relative_path, | |
| const char * | playlist_path, | |||
| pfc::string_base & | out | |||
| ) | [inline, virtual] |
| virtual void foobar2000_io::filesystem::remove | ( | const char * | p_path, | |
| abort_callback & | p_abort | |||
| ) | [pure virtual] |
| static FILE* foobar2000_io::filesystem::streamio_open | ( | const char * | p_path, | |
| const char * | p_flags | |||
| ) | [static] |
| virtual bool foobar2000_io::filesystem::supports_content_types | ( | ) | [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.
const GUID filesystem::class_guid [static] |
{ 0x2fbce1e5, 0x902e, 0x49e0, { 0xb9, 0xcf, 0xce, 0xf, 0xba, 0x76, 0x53, 0x48 } }
Reimplemented in foobar2000_io::archive.
1.6.2