File Information Schema
- Latest Version:
- https://ns.sm0tvi.net/finfo/index.shtml
Introduction
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.[1]
Arguments for:
- The relevant information is spread out
over
/etc/mailcap
,/etc/mime.types
, Windows™ Registry and other locations. - Using RDF allows for existing tools to be used for management of Media Types and files.
Potential uses:
- Rich directory listings on web interfaces. Tack on a
“
?properties
” onto the files URL, and the files metadata is served instead.
Demands on format:
- Format should also allow for easy location of relevant standards documents.
The Internet Media Type
mime-type := type "/" [tree "."] subtype ["+" suffix]* [";" parameter]; parameter := attribute "=" value ; attribute := token ; value := token / quoted-string ; token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials> tspecials := "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" / <"> / "/" / "[" / "]" / "?" / "=" ; Must be in quoted-string, to use within parameter values.
{ The Internet Assigned Numbers Authority (IANA) maintains the registry of official Internet Media Types.[2] }
finfo:File
— File Information
Properties
finfo:lastModified
— Last
Modifed Date and Time Property
Data Type: xsd:dateTime
finfo:symLinkFor
— Symbolic
Link Destination
Data Type(s): xsd:string
Classes
finfo:Plain
— Plain Files
finfo:contentLength
— File
Size Property
finfo:Directory
— Directory
Information
finfo:Block
— Block Device
Information
finfo:Character
— Character
Device Information
finfo:Door
— Door
Information
finfo:FIFO
— FIFO File
Information
finfo:Socket
— Socket File
Information
finfo:Unknown
— Unknown File
Information
MediaType
— Internet Media Type
Definition
finfo:aliasFor
—
Data Type: File:MediaType.
description
—
Longer description of media type than would fit into
finfo:title
.
finfo:edit
—
Data Type: xsd:anyURI
finfo:extensions
— Filename
Extension(s) Property
Data Type: xsd:string
A filename extension, file name extension or file extension is a
suffix to the name of a computer file (e.g., .txt
,
.docx
, .md
). The extension indicates a
characteristic of the file contents or its intended use. A filename
extension is typically delimited from the rest of the filename with
a full stop (period), but in some systems it is separated with
spaces. Other extension formats include dashes and/or underscores on
early versions of Linux and some versions of IBM AIX.
finfo:ianaTemplate
—
IANA
Template Property
Data Type: xsd:anyURI
When an internet media type has been officially defined by the IANA, it always has a template on record, accessible on the IANA website, and the absolute IRI to said template should be given in this property. However, applications SHOULD NOT rely on the presence or absence of this property to determine whether a media type is officially defined or not.
finfo:open
—
Data Type: xsd:anyURI
finfo:parameter
— Media Type
Parameters Property
Data Type: xsd:string
{ A very common parameter name is
charset
. }
finfo:specification
—
Data Type: xsd:anyURI
finfo:print
—
Data Type: xsd:anyURI
finfo:uniformTypeIdentifier
—
Uniform Type Identifier Property
An Uniform Type Identifier (UTI) is a text string used on software provided by Apple Inc. to uniquely identify a given class or type of item. Apple provides built-in UTIs to identify common system objects – document or image file types, folders and application bundles, streaming data, clipping data, movie data – and allows third party developers to add their own UTIs for application-specific or proprietary uses.
UTIs use a reverse-DNS naming structure. Names may include the ASCII characters A–Z, a–z, 0–9, hyphen ("-"), and period ("."), and all Unicode characters above U+007F. Colons and slashes are prohibited for compatibility with Macintosh and POSIX file path conventions. UTIs support multiple inheritance, allowing files to be identified with any number of relevant types, as appropriate to the contained data. UTIs are case-insensitive.
Common Properties
finfo:contentType
— Internet
Media Type
Data Type(s): finfo:MediaType
Subproperty of: finfo:File
,
finfo:MediaType
.
A media type (formerly known as a MIME type) is a two-part identifier for file formats and format contents transmitted on the Internet. Their purpose is somewhat similar to file extensions in that they identify the intended data format.
This property SHOULD be populated in the following order:
- The files extended attributes (e.g.
'
Content-Type
' or 'user.mime_type
' extended attributes under XFS). - Guess based on the files extension (e.g using
/etc/mime.types
or equivalent). - Server software guess (e.g. PHP's
mime_content_type()
). "application/octet-stream"
.
This property should should be a CURIE according to the following template:
media-type:{type-without-params}
The media type MUST be in lowercase ///
- application/* —
- audio/* —
- font/* —
- example/* —
- image/* —
- message/* —
- model/* —
- multipart/* —
- text/* —
- video/* —
{ Additionally, the following pseudo-types are defined in this schema. }
- inode/* —
- system/* —
- uri-scheme/* —
{ The following unofficial top-level types are in common use: }
References and Further Reading
-
[a]
Scott
Bradner: Key words for use in RFCs to
Indicate Requirement Levels. IETF
(Internet Engineering Task
Force) RFC 2119, BCP 14.
ISSN: 2070-1721. Date Published:
.
In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.Updated by IETF RFC 8174.
- [a] Media Types. Internet Assigned Numbers Authority (IANA).
- Wikipedia Contributors: Berkeley sockets. Wikipedia, the Free Encylopedia.
- Wikipedia Contributors: Device file. Wikipedia, the Free Encylopedia.
- Wikipedia Contributors: Doors (computing). Wikipedia, the Free Encylopedia.
- Wikipedia Contributors: FIFO (computing and electronics). Wikipedia, the Free Encylopedia.
- Wikipedia Contributors: Filename extension. Wikipedia, the Free Encylopedia.
- Wikipedia Contributors: Media Type. Wikipedia, the Free Encylopedia.
- Wikipedia Contributors: Uniform Type Identifier. Wikipedia, the Free Encylopedia.
-
Ned
Freed · John C. Klensin ·
Tony
Hansen: Media Type Specifications and Registration
Procedures. IETF (Internet Engineering Task
Force) RFC 6368,
BCP 13.
Date Published:
.
This document defines procedures for the specification and registration of media types for use in HTTP, MIME, and other Internet protocols.
- Ned Freed · Alexey Melnikov: Additional Media Type Structured Syntax Suffixes. IETF (Internet Engineering Task Force) RFC 6389. Date Published: .
- Alexey Melnikov · Julian F. Reschke : Update to MIME regarding "charset" Parameter Handling in Textual Media Types. IETF (Internet Engineering Task Force) RFC 6657. Date Published: .