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 223
Expand file tree
/
Copy pathdelete-URL.xml
More file actions
executable file
·68 lines (54 loc) · 7.12 KB
/
Copy pathdelete-URL.xml
File metadata and controls
executable file
·68 lines (54 loc) · 7.12 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
63
64
65
66
67
68
<doc>
<legacy_id>2216</legacy_id>
<name>delete URL</name>
<type>command</type>
<syntax>
<example>delete URL <i>URLtoDelete</i></example>
</syntax>
<synonyms>
<synonym>clear URL</synonym>
</synonyms>
<summary>Removes a <keyword tag="file">file</keyword> or <property tag="defaultFolder">directory</property> from a <glossary tag="server">server</glossary>, or removes a <keyword tag="file">file</keyword> from your system.</summary>
<examples>
<example><p>answer file "Select the file you wish to delete."</p><p>put it into tFileToDelete</p><p>delete URL ("file:" & tFileToDelete)</p></example>
</examples>
<history>
<introduced version="1.1">Added.</introduced>
<deprecated version=""></deprecated>
<removed version=""></removed>
<experimental version=""></experimental>
<nonexperimental version=""></nonexperimental>
</history>
<objects>
</objects>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
<network/>
</security>
<classification>
<category>Networks & Communication</category>
<category>Standalone Applications</category>
</classification>
<references>
<command tag="delete folder">delete folder Command</command>
<command tag="delete file">delete file Command</command>
<command tag="libURLSetFTPStopTime">libURLSetFTPStopTime Command</command>
<keyword tag="binfile">binfile Keyword</keyword>
<keyword tag="ftp">ftp Keyword</keyword>
</references>
<description>Use the <b>delete URL</b> <glossary tag="command">command</glossary> to remove a <keyword tag="file">file</keyword>.<p></p><p><b>Parameters:</b></p><p>The <i>URLtoDelete</i> specifies the <glossary tag="file path">name and location</glossary> of the <keyword tag="file">file</keyword> or <property tag="defaultFolder">directory</property> to delete, in the form of a <keyword tag="URL">URL</keyword>.</p><p></p><p><b>Comments:</b></p><p>If the file or directory is successfully deleted, the <b>result</b> <control_st tag="function">function</control_st> is set to empty. Otherwise, the <function tag="result">result</function> <control_st tag="function">function</control_st> returns an error message.</p><p></p><p>You can use a <b>file</b> or <keyword tag="binfile">binfile</keyword> <keyword tag="URL">URL</keyword> to delete a <keyword tag="file">file</keyword>, but not a <property tag="defaultFolder">folder</property>. To remove a <property tag="defaultFolder">folder</property> from your system, use the <command tag="delete folder">delete folder</command> <glossary tag="command">command</glossary>. (You can also use the <command tag="delete file">delete file</command> command to delete a <glossary tag="local file">local file</glossary>.)</p><p></p><p>This command can also be used to remove files and directories your stack did not create. Of course, a stack should not remove data it didn't create without obtaining explicit confirmation from the user.</p><p></p><p>Normally, FTP servers do not allow anonymous users to delete files, for obvious reasons. This means that while an <b>ftp</b> <keyword tag="URL">URL</keyword> without a user name and password is valid, you will almost always need a user name and password to use the <b>delete URL</b> <glossary tag="command">command</glossary>.</p><p></p><p></p><note> When used with an <keyword tag="ftp">ftp</keyword> or <keyword tag="http">http</keyword><keyword tag="URL">URL</keyword>, the <b>delete URL</b><glossary tag="command">command</glossary> is <glossary tag="blocking">blocking</glossary>: that is, the <glossary tag="handler">handler</glossary> pauses until LiveCode is finished deleting the <keyword tag="URL">URL</keyword>. Since deleting a file from a server may take some time due to network lag, the <b>delete URL</b><glossary tag="command">command</glossary> may take long enough to be noticeable to the user.</note><p></p><p></p><important>If a <glossary tag="blocking">blocking</glossary> operation involving a <keyword tag="URL">URL</keyword> (using the <command tag="put">put</command><glossary tag="command">command</glossary> to <glossary tag="upload">upload</glossary> a <keyword tag="URL">URL</keyword>, the <command tag="post">post</command><glossary tag="command">command</glossary>, the <b>delete URL</b><glossary tag="command">command</glossary>, or a <glossary tag="statement">statement</glossary> that gets an <keyword tag="ftp">ftp</keyword> or <keyword tag="http">http</keyword><keyword tag="URL">URL</keyword>) is going on, no other <glossary tag="blocking">blocking</glossary><keyword tag="URL">URL</keyword> operation can start until the previous one is finished. If you attempt to use a <keyword tag="URL">URL</keyword> in an <glossary tag="expression">expression</glossary>, or put data into a <keyword tag="URL">URL</keyword>, while another <glossary tag="blocking">blocking</glossary><keyword tag="URL">URL</keyword> operation is in progress, the <function tag="result">result</function> is set to "Error Previous request not completed".</important><p></p><p></p><important>The <b>delete URL</b><glossary tag="command">command</glossary> is part of the <glossary tag="Internet library">Internet library</glossary>. To ensure that the <glossary tag="command">command</glossary> works in a <glossary tag="standalone application">standalone application</glossary>, you must include this <glossary tag="LiveCode custom library">custom library</glossary> when you create your <glossary tag="standalone application">standalone</glossary>. In the Inclusions section of the <glossary tag="Standalone Application Settings">Standalone Application Settings</glossary> window, make sure "Internet Library" is selected in the list of script libraries.</important><p></p><p></p><note>When included in a <glossary tag="standalone application">standalone application</glossary>, the <glossary tag="Internet library">Internet library</glossary> is implemented as a hidden <command tag="group">group</command> and made available when the <command tag="group">group</command> receives its first <message tag="openBackground">openBackground</message> message. During the first part of the <glossary tag="application">application's</glossary> startup process, before this <keyword tag="message box">message</keyword> is sent, the <b>delete URL</b><glossary tag="command">command</glossary> is not yet available. This may affect attempts to use this <glossary tag="command">command</glossary> in <message tag="startup">startup</message>, <message tag="preOpenStack">preOpenStack</message>, <message tag="openStack">openStack</message>, or <message tag="preOpenCard">preOpenCard</message><glossary tag="handler">handlers</glossary> in the <glossary tag="main stack">main stack</glossary>. Once the <glossary tag="application">application</glossary> has finished starting up, the <command tag="start using">library</command> is available and the <b>delete URL</b><glossary tag="command">command</glossary> can be used in any <glossary tag="handler">handler</glossary>.</note></description>
</doc>