#include "mlview-file-descriptor.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/unistd.h>
#include <fcntl.h>
#include <libxml/uri.h>
#include <libxml/nanohttp.h>
#include <libxml/nanoftp.h>
Go to the source code of this file.
Data Structures | |
struct | _MlViewFileDescriptorPrivate |
This object is an encapsulation (at least for future portability issues) of a file handle. More... | |
Defines | |
#define | PRIVATE(file_desc) (file_desc->private) |
Enumerations | |
enum | MLVIEW_FILE_DESCRIPTOR_STATUS { MLVIEW_FILE_DESCRIPTOR_BAD_PARAM = -2, MLVIEW_FILE_DESCRIPTOR_FETCH_FAILED = -1, MLVIEW_FILE_DESCRIPTOR_OK = 0, MLVIEW_FILE_DESCRIPTOR_IS_LOCAL = 1 } |
Functions | |
MlViewFileDescriptor * | mlview_file_descriptor_new (const gchar *a_file_uri) |
void | mlview_file_descriptor_destroy (MlViewFileDescriptor *a_file_desc) |
void | mlview_file_descriptor_update_modified_time (MlViewFileDescriptor *a_file_desc) |
Sets the last modified time of the current instance of file descriptor to the current time. | |
gint | mlview_file_descriptor_is_modified (const MlViewFileDescriptor *a_file_desc, gboolean *a_is_modified) |
gint | mlview_file_descriptor_is_readable (const MlViewFileDescriptor *a_file_desc, gboolean *a_is_readable) |
gint | mlview_file_descriptor_is_writeable (const MlViewFileDescriptor *a_file_desc, gboolean *a_is_writeable) |
gchar * | mlview_file_descriptor_get_file_path (const MlViewFileDescriptor *a_file_desc) |
void | mlview_file_descriptor_set_file_path (MlViewFileDescriptor *a_file_desc, gchar *a_file_path) |
guint | mlview_file_descriptor_get_lmd (const MlViewFileDescriptor *a_file_desc) |
void | mlview_file_descriptor_set_lmd (MlViewFileDescriptor *a_file_desc, guint a_last_modif_time) |
Sets the last modified date to a_last_modif time. | |
gint | mlview_file_descriptor_is_dir (const MlViewFileDescriptor *a_file_desc, gboolean *a_is_dir) |
gint | mlview_file_descriptor_is_regular_file (const MlViewFileDescriptor *a_file_desc, gboolean *a_is_reg) |
gint | mlview_file_descriptor_create_directory (MlViewFileDescriptor *a_file_desc, guint a_mode) |
gint | mlview_file_descriptor_create_file (MlViewFileDescriptor *a_file_desc, guint a_mode) |
gint | mlview_file_descriptor_is_local (MlViewFileDescriptor *a_file_desc, gboolean *a_is_local) |
enum MLVIEW_FILE_DESCRIPTOR_STATUS | mlview_file_descriptor_fetch_file (MlViewFileDescriptor *a_file_desc, const gchar *a_file_path) |
If the file is remote, and the url is valid, fetches the file using the the protocol suggested by the url scheme (http or ftp) and stores the result on the local disk at the file path designated by file a_file_path. |
|
|
Definition at line 46 of file mlview-file-descriptor.c. |
|
Definition at line 386 of file mlview-file-descriptor.c. References PRIVATE. |
|
Definition at line 405 of file mlview-file-descriptor.c. References PRIVATE. Referenced by mlview_settings_manager_create_personal_settings_file(). |
|
Definition at line 103 of file mlview-file-descriptor.c. References PRIVATE. Referenced by mlview_app_context_get_xpm(), mlview_settings_manager_create_personal_settings_file(), and mlview_settings_manager_personal_settings_file_exists(). |
|
If the file is remote, and the url is valid, fetches the file using the the protocol suggested by the url scheme (http or ftp) and stores the result on the local disk at the file path designated by file a_file_path.
Definition at line 452 of file mlview-file-descriptor.c. References MLVIEW_FILE_DESCRIPTOR_BAD_PARAM, MLVIEW_FILE_DESCRIPTOR_FETCH_FAILED, MLVIEW_FILE_DESCRIPTOR_IS_LOCAL, mlview_file_descriptor_is_local(), MLVIEW_FILE_DESCRIPTOR_OK, and PRIVATE. |
|
Definition at line 257 of file mlview-file-descriptor.c. References PRIVATE. Referenced by mlview_editor_add_xml_document_view(), mlview_editor_remove_xml_document_view(), mlview_xml_document_clone(), mlview_xml_document_get_file_path(), and mlview_xml_document_save(). |
|
Definition at line 302 of file mlview-file-descriptor.c. References PRIVATE. |
|
Definition at line 337 of file mlview-file-descriptor.c. References PRIVATE. |
|
Definition at line 429 of file mlview-file-descriptor.c. References PRIVATE. Referenced by mlview_file_descriptor_fetch_file(). |
|
Definition at line 153 of file mlview-file-descriptor.c. References PRIVATE. Referenced by mlview_xml_document_needs_saving(). |
|
Definition at line 184 of file mlview-file-descriptor.c. References PRIVATE. Referenced by mlview_app_context_get_xpm(). |
|
Definition at line 361 of file mlview-file-descriptor.c. References PRIVATE. |
|
Definition at line 219 of file mlview-file-descriptor.c. References PRIVATE. Referenced by mlview_settings_manager_personal_settings_file_exists(). |
|
Definition at line 64 of file mlview-file-descriptor.c. References PRIVATE. Referenced by mlview_app_context_get_xpm(), mlview_settings_manager_create_personal_settings_file(), mlview_settings_manager_personal_settings_file_exists(), and mlview_xml_document_set_file_path(). |
|
Definition at line 274 of file mlview-file-descriptor.c. References PRIVATE. Referenced by mlview_xml_document_set_file_path(). |
|
Sets the last modified date to a_last_modif time.
Definition at line 320 of file mlview-file-descriptor.c. References PRIVATE. |
|
Sets the last modified time of the current instance of file descriptor to the current time.
Definition at line 135 of file mlview-file-descriptor.c. References PRIVATE. |