forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeleteResource.xml
More file actions
42 lines (42 loc) · 3.31 KB
/
Copy pathdeleteResource.xml
File metadata and controls
42 lines (42 loc) · 3.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<doc>
<legacy_id>2396</legacy_id>
<name>deleteResource</name>
<type>function</type>
<syntax>
<example>deleteResource(<i>file</i>,<i>resourceType</i>,{<i>resourceID </i>| <i>resourceName</i>})</example>
</syntax>
<library></library>
<objects>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Files, Folders, & Resources</category>
</classification>
<references>
<command tag="delete">delete Command</command>
<function tag="setResource">setResource Function</function>
<property tag="externals">externals Property</property>
</references>
<history>
<introduced version="1.0">Added.</introduced>
</history>
<platforms>
<mac/>
</platforms>
<classes>
<desktop/>
<web/>
</classes>
<security>
<disk access="???"/>
</security>
<summary>Removes a <glossary tag="resource">resource</glossary> from the <glossary tag="resource fork">resource fork</glossary> of a <glossary tag="Mac OS">Mac OS</glossary> <keyword tag="file">file</keyword>.</summary>
<examples>
<example>get deleteResource("New Build",ICN#,129)</example>
<example>put deleteResource(line x of theFiles,XFCN,"Colorize") into temp</example>
</examples>
<description>
<p>Use the <b>deleteResource</b> <control_st tag="function">function</control_st> to delete a <glossary tag="resource">resource</glossary> from a file.</p><p/><p><b>Parameters:</b></p><p>The <i>file</i> is the <glossary tag="file path">name and location</glossary> of the <keyword tag="file">file</keyword> containing the <glossary tag="resource">resource</glossary>. If you specify a name but not a location, LiveCode assumes the <keyword tag="file">file</keyword> is in the <property tag="defaultFolder">defaultFolder</property>.</p><p/><p>The <i>resourceType</i> is the 4-character type of the <glossary tag="resource">resource</glossary> you want to delete.</p><p/><p>The <i>resourceID</i> is an <keyword tag="integer">integer</keyword> that specifies the resource ID of the <glossary tag="resource">resource</glossary> you want to delete.</p><p/><p>The <i>resourceName</i> is the name of the <glossary tag="resource">resource</glossary> you want to delete.</p><p/><p><b>Value:</b></p><p>The <b>deleteResource</b> <control_st tag="function">function</control_st> always <glossary tag="return">returns</glossary> empty.</p><p/><p><b>Comments:</b></p><p>The <b>deleteResource</b> <control_st tag="function">function</control_st> deletes individual <glossary tag="resource">resources</glossary> within the <keyword tag="file">file</keyword>, but does not delete the <glossary tag="resource fork">resource fork</glossary>.</p><p/><p>If the <i>file</i> does not exist, the <function tag="result">result</function> is set to "<code>can't find file</code>".</p><p/><p>If the <i>file</i> exists but has no <glossary tag="resource fork">resource fork</glossary>, the <function tag="result">result</function> is set to "<code>can't open resource fork</code>".</p><p/><p>If the <i>file</i> exists but does not contain the specified <glossary tag="resource">resource</glossary>, the <function tag="result">result</function> is set to "<code>can't find the resource specified</code>".</p><p/><p>If the <i>file</i> is already open, the <function tag="result">result</function> is set to "<code>Can't open resource fork</code><a/>".</p>
</description>
</doc>