merged mc-4.6
[midnight-commander.git] / vfs / utilvfs.h
blobf4cdcf55629eb427820bb979c3c7d4be849911c3
1 #ifndef MC_VFS_UTILVFS_H
2 #define MC_VFS_UTILVFS_H
4 #include <sys/stat.h>
5 #include <stdbool.h>
7 /* Flags for vfs_split_url() */
8 #define URL_ALLOW_ANON 1
9 #define URL_NOSLASH 2
11 int vfs_finduid (const char *name);
12 int vfs_findgid (const char *name);
14 char *vfs_split_url (const char *path, char **host, char **user, int *port,
15 char **pass, int default_port, int flags);
16 int vfs_split_text (char *p);
18 int vfs_mkstemps (char **pname, const char *prefix, const char *basename);
19 void vfs_die (const char *msg);
20 char *vfs_get_password (const char *msg);
22 bool vfs_parse_filetype (const char *s, size_t *ret_skipped,
23 mode_t *ret_type);
24 bool vfs_parse_fileperms (const char *s, size_t *ret_skipped,
25 mode_t *ret_perms);
26 bool vfs_parse_filemode (const char *s, size_t *ret_skipped,
27 mode_t *ret_mode);
28 bool vfs_parse_raw_filemode (const char *s, size_t *ret_skipped,
29 mode_t *ret_mode);
31 int vfs_parse_ls_lga (const char *p, struct stat *s, char **filename,
32 char **linkname);
33 int vfs_parse_filedate (int idx, time_t *t);
35 #endif