Merge branch '2134_am_silent_rules'
[kaloumi3.git] / lib / vfs / mc-vfs / utilvfs.h
blobf7876e9931afa587573c450a9acba3ade9880b2d
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"
16 /** Bit flags for vfs_split_url()
18 * Modify parsing parameters according to flag meaning.
19 * @see vfs_split_url()
21 enum VFS_URL_FLAGS {
22 URL_USE_ANONYMOUS = 1, /**< if set, empty *user will contain NULL instead of current */
23 URL_NOSLASH = 2 /**< if set, 'proto://' part in url is not searched */
26 int vfs_finduid (const char *name);
27 int vfs_findgid (const char *name);
29 char *vfs_split_url (const char *path, char **host, char **user, int *port,
30 char **pass, int default_port, enum VFS_URL_FLAGS flags);
31 int vfs_split_text (char *p);
33 int vfs_mkstemps (char **pname, const char *prefix, const char *basename);
34 void vfs_die (const char *msg);
35 char *vfs_get_password (const char *msg);
37 char * vfs_get_local_username(void);
39 gboolean vfs_parse_filetype (const char *s, size_t *ret_skipped,
40 mode_t *ret_type);
41 gboolean vfs_parse_fileperms (const char *s, size_t *ret_skipped,
42 mode_t *ret_perms);
43 gboolean vfs_parse_filemode (const char *s, size_t *ret_skipped,
44 mode_t *ret_mode);
45 gboolean vfs_parse_raw_filemode (const char *s, size_t *ret_skipped,
46 mode_t *ret_mode);
48 int vfs_parse_ls_lga (const char *p, struct stat *s, char **filename,
49 char **linkname);
50 int vfs_parse_filedate (int idx, time_t *t);
52 #endif