forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathclose-file.lcdoc
More file actions
56 lines (39 loc) · 1.45 KB
/
close-file.lcdoc
File metadata and controls
56 lines (39 loc) · 1.45 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
Name: close file
Type: command
Syntax: close file <filePath>
Summary:
Closes a <file> that was opened with the <open file> <command>.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Security: disk
Example:
close file "/Desktop/Temp"
Example:
close file line 1 of the openFiles
Example:
open file (specialFolderPath("desktop") & "/text.txt")
write "This is a test" \
to file (specialFolderPath("desktop") & "/text.txt" )
close file (specialFolderPath("desktop") & "/text.txt")
Parameters:
filePath:
The name and location of the file you want to close. If you specify a
name but not a location, LiveCode assumes the file is in the
defaultFolder.
The result:
If you try to close a file that is not already open, the result function
is set to "file is not open".
Description:
Use the <close file> <command> to release a <file> after reading from it
or writing to it. (A <file> that is open for writing can't be used by
any other application until you've closed the <file>.)
Any files you have opened are closed automatically when you quit the
application.
References: write to file (command), close driver (command),
open file (command), close (command), seek (command),
read from file (command), delete file (command), openFiles (function),
sysError (function), command (glossary), file (keyword), modem: (keyword),
printer: (keyword), COMn: (keyword), LPT1: (keyword),
serialControlString (property)
Tags: file system