MT Invictus Schemas

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

Image: Railroad diagram of the internet media type
Fig. ?: The railroad diagram of 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.
Figure #: Media type syntax in Extended Backus–Naur form (EBNF) notation.

{ 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

[Warning Icon]
Security Risk
Please note that although the file information schema has this property, it SHOULD NOT be exposed to non-trusted agents.

Classes

finfo:Plain — Plain Files

finfo:contentLength — File Size Property

finfo:Directory — Directory Information

finfo:Block — Block Device Information

[Warning Icon]
Security Risk
Please note that although the file information schema has this class, it SHOULD NOT be exposed to non-trusted agents.

finfo:Character — Character Device Information

[Warning Icon]
Security Risk
Please note that although the file information schema has this class, it SHOULD NOT be exposed to non-trusted agents.

finfo:Door — Door Information

[Warning Icon]
Security Risk
Please note that although the file information schema has this class, it SHOULD NOT be exposed to non-trusted agents.

finfo:FIFO — FIFO File Information

[Warning Icon]
Security Risk
Please note that although the file information schema has this class, it SHOULD NOT be exposed to non-trusted agents.

finfo:Socket — Socket File Information

[Warning Icon]
Security Risk
Please note that although the file information schema has this class, it SHOULD NOT be exposed to non-trusted agents.

finfo:Unknown — Unknown File Information

[Warning Icon]
Security Risk
Please note that although the file information schema has this class, it SHOULD NOT be exposed to non-trusted agents.

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:ianaTemplateIANA 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:

  1. The files extended attributes (e.g. 'Content-Type' or 'user.mime_type' extended attributes under XFS).
  2. Guess based on the files extension (e.g using /etc/mime.types or equivalent).
  3. Server software guess (e.g. PHP's mime_content_type()).
  4. "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 ///

{ Additionally, the following pseudo-types are defined in this schema. }

{ The following unofficial top-level types are in common use: }

References and Further Reading

  1. [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.
  2. [a] Media Types. Internet Assigned Numbers Authority (IANA).