summaryrefslogtreecommitdiff
path: root/docs/Classes/SDLFile.html
diff options
context:
space:
mode:
Diffstat (limited to 'docs/Classes/SDLFile.html')
-rw-r--r--docs/Classes/SDLFile.html107
1 files changed, 57 insertions, 50 deletions
diff --git a/docs/Classes/SDLFile.html b/docs/Classes/SDLFile.html
index af15542f5..c77a5bd74 100644
--- a/docs/Classes/SDLFile.html
+++ b/docs/Classes/SDLFile.html
@@ -8,7 +8,9 @@
<li><a href="#section-name">name</a></li>
<li><a href="#section-fileURL">fileURL</a></li>
<li><a href="#section-data">data</a></li>
+ <li><a href="#section-fileSize">fileSize</a></li>
<li><a href="#section-fileType">fileType</a></li>
+ <li><a href="#section-inputStream">inputStream</a></li>
<li><a href="#section--init">-init</a></li>
<li><a href="#section--initWithFileURL:name:persistent:">-initWithFileURL:name:persistent:</a></li>
<li><a href="#section-+persistentFileAtFileURL:name:">+persistentFileAtFileURL:name:</a></li>
@@ -114,6 +116,24 @@
+ <h3 id="section-fileSize">
+ fileSize
+ </h3>
+
+ <p>The size of the binary data of the SDLFile.</p>
+
+
+
+ <h4>Objective-C</h4>
+ <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readonly</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="kt">unsigned</span> <span class="kt">long</span> <span class="kt">long</span> <span class="n">fileSize</span><span class="p">;</span></code></pre>
+
+
+ <h4>Swift</h4>
+ <pre class="highlight"><code><span class="k">var</span> <span class="nv">fileSize</span><span class="p">:</span> <span class="kt">UInt64</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
+
+
+
+
<h3 id="section-fileType">
fileType
</h3>
@@ -123,11 +143,29 @@
<h4>Objective-C</h4>
- <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readonly</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n"><a href="../Classes/SDLFileType.html">SDLFileType</a></span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">fileType</span><span class="p">;</span></code></pre>
+ <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readonly</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n"><a href="../Type Definitions.html#/c:SDLFileType.h@T@SDLFileType">SDLFileType</a></span> <span class="n">_Nonnull</span> <span class="n">fileType</span><span class="p">;</span></code></pre>
+
+
+ <h4>Swift</h4>
+ <pre class="highlight"><code><span class="k">var</span> <span class="nv">fileType</span><span class="p">:</span> <span class="kt"><a href="../Type Definitions.html#/c:SDLFileType.h@T@SDLFileType">SDLFileType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
+
+
+
+
+ <h3 id="section-inputStream">
+ inputStream
+ </h3>
+
+ <p>A stream to pull binary data from a SDLFile. The stream only pulls required data from the file on disk or in memory. This reduces memory usage while uploading a large file to the remote system as each chunk of data can be released immediately after it is uploaded.</p>
+
+
+
+ <h4>Objective-C</h4>
+ <pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readonly</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">NSInputStream</span> <span class="o">*</span><span class="n">_Nonnull</span> <span class="n">inputStream</span><span class="p">;</span></code></pre>
<h4>Swift</h4>
- <pre class="highlight"><code><span class="k">var</span> <span class="nv">fileType</span><span class="p">:</span> <span class="kt"><a href="../Classes/SDLFileType.html">SDLFileType</a></span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
+ <pre class="highlight"><code><span class="k">var</span> <span class="nv">inputStream</span><span class="p">:</span> <span class="kt">InputStream</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
@@ -165,19 +203,15 @@
<h4>Parameters</h4>
<dl>
<dt>url</dt>
- <dd><p>The file URL pointing to the local data that will be pushed to the remote system.</p>
-</dd>
+ <dd><p>The file URL pointing to the local data that will be pushed to the remote system.</p></dd>
<dt>name</dt>
- <dd><p>The name that the file will be stored under on the remote system and how it will be referenced from the local system.</p>
-</dd>
+ <dd><p>The name that the file will be stored under on the remote system and how it will be referenced from the local system. The max file name length may vary based on remote filesystem limitations.</p></dd>
<dt>persistent</dt>
- <dd><p>Whether or not the file will persist between ignition cycles.</p>
-</dd>
+ <dd><p>Whether or not the file will persist between ignition cycles.</p></dd>
</dl>
<div>
<h4>Return Value</h4>
<p>An SDLFile object.</p>
-
</div>
<h3 id="section-+persistentFileAtFileURL:name:">
@@ -189,7 +223,6 @@
<p>This is a persistent file, it will be persisted through sessions / ignition cycles. You will only have a limited space for all files, so be sure to only persist files that are required for all or most sessions. For example, menu artwork should be persistent.</p>
<p>Ephemeral files should be created using ephemeralFileAtURL:name:</p>
-
<div class="aside aside-warning">
<p class="aside-title">Warning</p>
<p>If this is not a readable file, this will return nil</p>
@@ -203,24 +236,18 @@
<span class="nf">name</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">name</span><span class="p">;</span></code></pre>
- <h4>Swift</h4>
- <pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">persistentFile</span><span class="p">(</span><span class="n">atFileURL</span> <span class="nv">url</span><span class="p">:</span> <span class="kt">URL</span><span class="p">,</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>
-
<h4>Parameters</h4>
<dl>
<dt>url</dt>
- <dd><p>The url to the file that should be uploaded.</p>
-</dd>
+ <dd><p>The url to the file that should be uploaded.</p></dd>
<dt>name</dt>
- <dd><p>The name of the file that will be used to reference the file in the future (for example on the remote file system).</p>
-</dd>
+ <dd><p>The name of the file that will be used to reference the file in the future (for example on the remote file system). The max file name length may vary based on remote filesystem limitations.</p></dd>
</dl>
<div>
<h4>Return Value</h4>
<p>An instance of this class, or nil if a readable file at the path could not be found.</p>
-
</div>
<h3 id="section-+fileAtFileURL:name:">
@@ -232,7 +259,6 @@
<p>This is an ephemeral file, it will not be persisted through sessions / ignition cycles. Any files that you do not <em>know</em> you will use in future sessions should be created through this method. For example, album / artist artwork should be ephemeral.</p>
<p>Persistent files should be created using persistentFileAtURL:name:</p>
-
<div class="aside aside-warning">
<p class="aside-title">Warning</p>
<p>If this is not a readable file, this will return nil</p>
@@ -254,16 +280,13 @@
<h4>Parameters</h4>
<dl>
<dt>url</dt>
- <dd><p>The url to the file on disk that will be uploaded</p>
-</dd>
+ <dd><p>The url to the file on disk that will be uploaded</p></dd>
<dt>name</dt>
- <dd><p>The name of the file that will be used to reference the file in the future (for example on the remote file system).</p>
-</dd>
+ <dd><p>The name of the file that will be used to reference the file in the future (for example on the remote file system). The max file name length may vary based on remote file system limitations.</p></dd>
</dl>
<div>
<h4>Return Value</h4>
<p>An instance of this class, or nil if a readable file at the url could not be found.</p>
-
</div>
<h3 id="section--initWithData:name:fileExtension:persistent:">
@@ -289,22 +312,17 @@
<h4>Parameters</h4>
<dl>
<dt>data</dt>
- <dd><p>The raw data to be used for the file</p>
-</dd>
+ <dd><p>The raw data to be used for the file</p></dd>
<dt>name</dt>
- <dd><p>The name of the file that will be used to reference the file in the future (for example on the remote file system).</p>
-</dd>
+ <dd><p>The name of the file that will be used to reference the file in the future (for example on the remote file system). The max file name length may vary based on remote file system limitations.</p></dd>
<dt>extension</dt>
- <dd><p>The file extension. For example <q>png</q>. Currently supported file extensions are: <q>bmp</q>, <q>jpg</q>, <q>jpeg</q>, <q>png</q>, <q>wav</q>, <q>mp3</q>, <q>aac</q>, <q>json</q>. All others will be sent as binary files.</p>
-</dd>
+ <dd><p>The file extension. For example <q>png</q>. Currently supported file extensions are: <q>bmp</q>, <q>jpg</q>, <q>jpeg</q>, <q>png</q>, <q>wav</q>, <q>mp3</q>, <q>aac</q>, <q>json</q>. All others will be sent as binary files.</p></dd>
<dt>persistent</dt>
- <dd><p>Whether or not the remote file with this data should be persistent</p>
-</dd>
+ <dd><p>Whether or not the remote file with this data should be persistent</p></dd>
</dl>
<div>
<h4>Return Value</h4>
<p>An instance of this class</p>
-
</div>
<h3 id="section-+persistentFileWithData:name:fileExtension:">
@@ -323,27 +341,20 @@
<span class="nf">fileExtension</span><span class="p">:(</span><span class="n">nonnull</span> <span class="n">NSString</span> <span class="o">*</span><span class="p">)</span><span class="nv">extension</span><span class="p">;</span></code></pre>
- <h4>Swift</h4>
- <pre class="highlight"><code><span class="kd">class</span> <span class="kd">func</span> <span class="nf">persistentFile</span><span class="p">(</span><span class="n">with</span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="n">fileExtension</span> <span class="nv">extension</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span></code></pre>
-
<h4>Parameters</h4>
<dl>
<dt>data</dt>
- <dd><p>The raw data to be used for the file</p>
-</dd>
+ <dd><p>The raw data to be used for the file</p></dd>
<dt>name</dt>
- <dd><p>The name of the file that will be used to reference the file in the future (for example on the remote file system).</p>
-</dd>
+ <dd><p>The name of the file that will be used to reference the file in the future (for example on the remote file system). The max file name length may vary based on remote file system limitations.</p></dd>
<dt>extension</dt>
- <dd><p>The file extension. For example <q>png</q>. Currently supported file extensions are: <q>bmp</q>, <q>jpg</q>, <q>jpeg</q>, <q>png</q>, <q>wav</q>, <q>mp3</q>, <q>aac</q>, <q>json</q>. All others will be sent as binary files.</p>
-</dd>
+ <dd><p>The file extension. For example <q>png</q>. Currently supported file extensions are: <q>bmp</q>, <q>jpg</q>, <q>jpeg</q>, <q>png</q>, <q>wav</q>, <q>mp3</q>, <q>aac</q>, <q>json</q>. All others will be sent as binary files.</p></dd>
</dl>
<div>
<h4>Return Value</h4>
<p>An instance of this class</p>
-
</div>
<h3 id="section-+fileWithData:name:fileExtension:">
@@ -370,19 +381,15 @@
<h4>Parameters</h4>
<dl>
<dt>data</dt>
- <dd><p>The raw data to be used for the file</p>
-</dd>
+ <dd><p>The raw data to be used for the file</p></dd>
<dt>name</dt>
- <dd><p>The name of the file that will be used to reference the file in the future (for example on the remote file system).</p>
-</dd>
+ <dd><p>The name of the file that will be used to reference the file in the future (for example on the remote file system). The max file name length may vary based on remote file system limitations.</p></dd>
<dt>extension</dt>
- <dd><p>The file extension. For example <q>png</q>. Currently supported file extensions are: <q>bmp</q>, <q>jpg</q>, <q>jpeg</q>, <q>png</q>, <q>wav</q>, <q>mp3</q>, <q>aac</q>, <q>json</q>. All others will be sent as binary files.</p>
-</dd>
+ <dd><p>The file extension. For example <q>png</q>. Currently supported file extensions are: <q>bmp</q>, <q>jpg</q>, <q>jpeg</q>, <q>png</q>, <q>wav</q>, <q>mp3</q>, <q>aac</q>, <q>json</q>. All others will be sent as binary files.</p></dd>
</dl>
<div>
<h4>Return Value</h4>
<p>An instance of this class</p>
-
</div>
</section>