This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathdeleteResource.lcdoc
More file actions
63 lines (43 loc) · 1.69 KB
/
deleteResource.lcdoc
File metadata and controls
63 lines (43 loc) · 1.69 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Name: deleteResource
Type: function
Syntax: deleteResource(<file>, <resourceType>,{<resourceID> | <resourceName>})
Summary:
Removes a <resource> from the <resource fork> of a <Mac OS> <file>.
Introduced: 1.0
OS: mac
Platforms: desktop
Security: disk
Example:
get deleteResource("New Build","ICN#",129)
Example:
put deleteResource(line x of theFiles,"XFCN","Colorize") into temp
Parameters:
file:
The name and location of the file containing the resource. If you
specify a name but not a location, LiveCode assumes the file is in the
defaultFolder.
resourceType:
The 4-character type of the resource you want to delete.
resourceID (integer):
An integer that specifies the resource ID of the resource you want to
delete.
resourceName:
The name of the resource you want to delete.
Returns:
The <deleteResource> <function> always <return|returns> empty.
The result:
If the <file> does not exist, the <result> is set to "can't find file".
If the <file> exists but has no <resource fork>, the <result> is set to
"can't open resource fork". If the <file> exists but does not contain
the specified <resource>, the <result> is set to
"can't find the resource specified". If the <file> is already open, the
<result> is set to "Can't open resource fork<a/>".
Description:
Use the <deleteResource> <function> to delete a <resource> from a file.
The <deleteResource> <function> deletes individual <resource|resources>
within the <file>, but does not delete the <resource fork>.
References: delete (command), function (control structure),
result (function), setResource (function), resource fork (glossary),
resource (glossary), Mac OS (glossary), return (glossary), file (keyword),
externals (property)
Tags: file system