FUSE compat: add MIME type faking

* Add special handling for reading the BEOS:TYPE attribute to supply
  on-the-fly fake MIME types for FUSE module filesystems, the same
  way it's done in our FAT and NTFS FS modules

* Reuse the mime_ext_table which we already have and put it into a
  shared location so we don't get further extra copies of it
This commit is contained in:
Julian Harnath
2017-02-27 19:58:22 +00:00
parent 5adf34b0d5
commit 6ced92452c
4 changed files with 224 additions and 9 deletions
@@ -0,0 +1,24 @@
/*
Copyright 1999-2001, Be Incorporated. All Rights Reserved.
This file may be used under the terms of the Be Sample Code License.
*/
#ifndef MIME_TYPES_H
#define MIME_TYPES_H
#ifdef __cplusplus
extern "C" {
#endif
extern const char* kAttrMimeTypeName;
extern status_t set_mime(const char** mime, const char* filename);
#ifdef __cplusplus
}
#endif
#endif