utilvfs.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /**
  2. * \file
  3. * \brief Header: Utilities for VFS modules
  4. * \author Miguel de Icaza
  5. * \date 1995, 1996
  6. */
  7. #ifndef MC_VFS_UTILVFS_H
  8. #define MC_VFS_UTILVFS_H
  9. #include <sys/stat.h>
  10. /* Flags for vfs_split_url() */
  11. #define URL_ALLOW_ANON 1
  12. #define URL_NOSLASH 2
  13. int vfs_finduid (const char *name);
  14. int vfs_findgid (const char *name);
  15. char *vfs_split_url (const char *path, char **host, char **user, int *port,
  16. char **pass, int default_port, int flags);
  17. 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);
  21. gboolean vfs_parse_filetype (const char *s, size_t *ret_skipped,
  22. mode_t *ret_type);
  23. gboolean vfs_parse_fileperms (const char *s, size_t *ret_skipped,
  24. mode_t *ret_perms);
  25. gboolean vfs_parse_filemode (const char *s, size_t *ret_skipped,
  26. mode_t *ret_mode);
  27. gboolean vfs_parse_raw_filemode (const char *s, size_t *ret_skipped,
  28. mode_t *ret_mode);
  29. int vfs_parse_ls_lga (const char *p, struct stat *s, char **filename,
  30. char **linkname);
  31. int vfs_parse_filedate (int idx, time_t *t);
  32. #endif