Ticket #212
[midnight-commander.git] / vfs / utilvfs.h
blob5747ee32ab1cc220439a411bf2958e59b4e2fdce
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 /* Flags for vfs_split_url() */
15 #define URL_ALLOW_ANON 1
16 #define URL_NOSLASH 2
18 int vfs_finduid (const char *name);
19 int vfs_findgid (const char *name);
21 char *vfs_split_url (const char *path, char **host, char **user, int *port,
22 char **pass, int default_port, int flags);
23 int vfs_split_text (char *p);
25 int vfs_mkstemps (char **pname, const char *prefix, const char *basename);
26 void vfs_die (const char *msg);
27 char *vfs_get_password (const char *msg);
29 gboolean vfs_parse_filetype (const char *s, size_t *ret_skipped,
30 mode_t *ret_type);
31 gboolean vfs_parse_fileperms (const char *s, size_t *ret_skipped,
32 mode_t *ret_perms);
33 gboolean vfs_parse_filemode (const char *s, size_t *ret_skipped,
34 mode_t *ret_mode);
35 gboolean vfs_parse_raw_filemode (const char *s, size_t *ret_skipped,
36 mode_t *ret_mode);
38 int vfs_parse_ls_lga (const char *p, struct stat *s, char **filename,
39 char **linkname);
40 int vfs_parse_filedate (int idx, time_t *t);
42 #endif