操作系统目录的MIME类型是什么?
当我尝试使用内容检测一个目录的MIME类型时,在Ubuntu上我得到了text/plain; charset=utf-8
。
操作系统目录的MIME类型是什么?
当我尝试使用内容检测一个目录的MIME类型时,在Ubuntu上我得到了text/plain; charset=utf-8
。
在Ubuntu上,目录的 mimetype 是 inode/directory
如果在Ubuntu上运行:
$ mimetype /home/<your username>
/home/<your username>: inode/directory
在 IANA 标准中(http://www.rfc-editor.org/rfc/rfc2425.txt 和 http://www.iana.org/assignments/media-types/text)有一个 "text/directory" 类型,但已被标记为 "deprecated"。
file -i /home/
会产生application/x-directory; charset=binary
的结果。 - zamnutsinode/directory
是 .desktop
文件中 MimeType
字段所使用的,用于指示该应用程序可用于查看目录。 - Jesse这个问题没有通用答案。
在Windows上,目录被认为没有MIME类型。
在Android上,文档提供程序公开的目录类型为“vnd.android.document/directory”,而其他内容提供程序公开的目录通常采用“vnd.android.cursor.dir/<something>”形式。
在Linux上,xdg共享MIME信息规范指定应使用“inode/directory”来将目录与应用程序相关联。