Ticket #2862: fix syncronization with filelist and tree panels
[midnight-commander.git] / lib / vfs / utilvfs.h
blobcc21d26f961f2fd31d1cc30ac41422e0b24172d5
2 /**
3 * \file
4 * \brief Header: Utilities for VFS modules
5 * \author Miguel de Icaza
6 * \date 1995, 1996
7 */
9 #ifndef MC_VFS_UTILVFS_H
10 #define MC_VFS_UTILVFS_H
12 #include <sys/stat.h>
14 #include "lib/global.h"
15 #include "path.h"
17 /*** typedefs(not structures) and defined constants **********************************************/
19 /*** enums ***************************************************************************************/
21 /** Bit flags for vfs_url_split()
23 * Modify parsing parameters according to flag meaning.
24 * @see vfs_url_split()
26 typedef enum
28 URL_FLAGS_NONE = 0,
29 URL_USE_ANONYMOUS = 1, /**< if set, empty *user will contain NULL instead of current */
30 URL_NOSLASH = 2 /**< if set, 'proto://' part in url is not searched */
31 } vfs_url_flags_t;
33 /*** structures declarations (and typedefs of structures)*****************************************/
35 /*** global variables defined in .c file *********************************************************/
37 /*** declarations of public functions ************************************************************/
39 int vfs_finduid (const char *name);
40 int vfs_findgid (const char *name);
42 vfs_path_element_t *vfs_url_split (const char *path, int default_port, vfs_url_flags_t flags);
43 int vfs_split_text (char *p);
45 int vfs_mkstemps (vfs_path_t ** pname_vpath, const char *prefix, const char *basename);
46 void vfs_die (const char *msg);
47 char *vfs_get_password (const char *msg);
49 char *vfs_get_local_username (void);
51 gboolean vfs_parse_filetype (const char *s, size_t * ret_skipped, mode_t * ret_type);
52 gboolean vfs_parse_fileperms (const char *s, size_t * ret_skipped, mode_t * ret_perms);
53 gboolean vfs_parse_filemode (const char *s, size_t * ret_skipped, mode_t * ret_mode);
54 gboolean vfs_parse_raw_filemode (const char *s, size_t * ret_skipped, mode_t * ret_mode);
56 void vfs_parse_ls_lga_init (void);
57 gboolean vfs_parse_ls_lga (const char *p, struct stat *s, char **filename, char **linkname,
58 size_t * filename_pos);
59 size_t vfs_parse_ls_lga_get_final_spaces (void);
60 int vfs_parse_filedate (int idx, time_t * t);
62 /*** inline functions ****************************************************************************/
63 #endif