2 # Copyright (C) 2010 Leonard Ritter <paniq@paniq.org>
3 # Copyright (C) 2010 David Robillard <d@drobilla.net>
5 # Permission is hereby granted, free of charge, to any person obtaining a
6 # copy of this software and associated documentation files (the "Software"),
7 # to deal in the Software without restriction, including without limitation
8 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 # and/or sell copies of the Software, and to permit persons to whom the
10 # Software is furnished to do so, subject to the following conditions:
12 # The above copyright notice and this permission notice shall be included
13 # in all copies or substantial portions of the Software.
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 # OTHER DEALINGS IN THE SOFTWARE.
23 @prefix files: <http://lv2plug.in/ns/ext/files#> .
24 @prefix atom: <http://lv2plug.in/ns/ext/atom#> .
25 @prefix doap: <http://usefulinc.com/ns/doap#> .
26 @prefix foaf: <http://xmlns.com/foaf/0.1/> .
27 @prefix lv2: <http://lv2plug.in/ns/lv2core#> .
28 @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
29 @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
30 @prefix xsd: <http://www.w3.org/2001/XMLSchema> .
32 <http://lv2plug.in/ns/ext/files>
34 doap:name "LV2 Files" ;
37 foaf:name "David Robillard" ;
38 foaf:homepage <http://drobilla.net/> ;
39 rdfs:seeAlso <http://drobilla.net/drobilla.rdf>
42 This extension provides a mechanism for plugins to create new files for
43 storing arbitrary data (e.g. waveforms), which can be persisted using
44 the <a href="http://lv2plug.in/ns/ext/persist">LV2 Persist</a> extension.
45 This allows plugins to work with potentially very large data via files,
46 and save/restore these files.
48 The motivating idea behind this extension is that all details of file
49 management must be handled by the host in whatever way is most appropriate for
50 that host. Plugins MUST NOT make any assumption about filesystem locations
51 beyond what is explicitly guaranteed by this extension.
53 To create a new file, plugins request a filename from the host. This way,
54 the host is aware of files used by the plugin and can use an appropriate
55 location for them that the plugin alone could not know (e.g. using an
56 appropriate disk volume for recording).
58 Plugins may also use pre-existing files from elsewhere on the filesystem.
59 Using the LV2 Persist extension, the host can save both these types of files
60 in an appropriate way (by e.g. storing a link, or copying the file to export
61 or archive a project).
65 files:fileSupport a lv2:Feature ;
66 rdfs:label "Support for plugin-created files" ;
68 This feature allows plugins to use pre-existing or newly created files,
69 and files them (e.g. across project saves and restores). If a host supports
70 this feature it passes a LV2_Files_FileSupport structure to the plugins
71 instantiate method as a feature (with URI
72 http://lv2plug.in/ns/ext/files#FileSupport). This structure provides
73 a function the plugin can use to create new file names. If and only if the
74 host supports this feature, the plugin MAY files and restore values of
75 type LV2_FILES_FILENAME.
77 A plugin SHOULD use this facility to create any new files it may need
78 (e.g. samples, waveforms for recording). Plugins MUST NOT expect their
79 state to be correctly restored if they do not use this mechanism to
83 files:FilePath a atom:AtomType ;
84 rdfs:label "File Path" ;
86 The full path to a file on the local filesystem. The format of a
87 files:filePath is a C string (escaped or otherwise restricted in whatever way
88 necessary for the system). This URI (http://lv2plug.in/ns/ext/files#FilePath),
89 mapped to an integer, should be used as the <code>type</code> parameter with
90 the LV2 Persist extension to persist a file. When persisting a files:FilePath,
91 the plugin MUST NOT assume that the same path will be restored (i.e. the
92 host MAY choose to store the file elsewhere). The plugin may, of course,
93 assume that the actual contents of the file are equivalent when restored.