annotate Doc/libmacfs.tex @ 5817:48b94de85bf3 legacy-trunk

Extensive changes by AMK.
author Guido van Rossum <guido@python.org>
date Thu, 17 Jul 1997 16:29:42 +0000
parents 4cef23e1dcca
children 3468ea8645ca
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
1 \section{Built-in Module \sectcode{macfs}}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
2 \bimodindex{macfs}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
3
2453
cdd3a721b40e a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents: 2452
diff changeset
4 \renewcommand{\indexsubitem}{(in module macfs)}
cdd3a721b40e a few typographical changes (e.g. -- => ---) and lots of new stuff in the WWW chapter
Guido van Rossum <guido@python.org>
parents: 2452
diff changeset
5
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
6 This module provides access to macintosh FSSpec handling, the Alias
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
7 Manager, finder aliases and the Standard File package.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
8
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
9 Whenever a function or method expects a \var{file} argument, this
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
10 argument can be one of three things:\ (1) a full or partial Macintosh
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
11 pathname, (2) an FSSpec object or (3) a 3-tuple \code{(wdRefNum,
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
12 parID, name)} as described in Inside Mac VI\@. A description of aliases
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
13 and the standard file package can also be found there.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
14
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
15 \begin{funcdesc}{FSSpec}{file}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
16 Create an FSSpec object for the specified file.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
17 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
18
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
19 \begin{funcdesc}{RawFSSpec}{data}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
20 Create an FSSpec object given the raw data for the C structure for the
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
21 FSSpec as a string. This is mainly useful if you have obtained an
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
22 FSSpec structure over a network.
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
23 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
24
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
25 \begin{funcdesc}{RawAlias}{data}
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
26 Create an Alias object given the raw data for the C structure for the
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
27 alias as a string. This is mainly useful if you have obtained an
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
28 FSSpec structure over a network.
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
29 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
30
2941
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
31 \begin{funcdesc}{FInfo}{}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
32 Create a zero-filled FInfo object.
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
33 \end{funcdesc}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
34
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
35 \begin{funcdesc}{ResolveAliasFile}{file}
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
36 Resolve an alias file. Returns a 3-tuple \code{(\var{fsspec}, \var{isfolder},
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
37 \var{aliased})} where \var{fsspec} is the resulting FSSpec object,
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
38 \var{isfolder} is true if \var{fsspec} points to a folder and
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
39 \var{aliased} is true if the file was an alias in the first place
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
40 (otherwise the FSSpec object for the file itself is returned).
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
41 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
42
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
43 \begin{funcdesc}{StandardGetFile}{\optional{type\, ...}}
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
44 Present the user with a standard ``open input file''
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
45 dialog. Optionally, you can pass up to four 4-char file types to limit
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
46 the files the user can choose from. The function returns an FSSpec
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
47 object and a flag indicating that the user completed the dialog
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
48 without cancelling.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
49 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
50
2994
ac0152f63bdd Documented PromptGetFile and optional prompt to GetDirectory.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2941
diff changeset
51 \begin{funcdesc}{PromptGetFile}{prompt\optional{\, type\, ...}}
ac0152f63bdd Documented PromptGetFile and optional prompt to GetDirectory.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2941
diff changeset
52 Similar to \var{StandardGetFile} but allows you to specify a prompt.
ac0152f63bdd Documented PromptGetFile and optional prompt to GetDirectory.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2941
diff changeset
53 \end{funcdesc}
ac0152f63bdd Documented PromptGetFile and optional prompt to GetDirectory.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2941
diff changeset
54
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
55 \begin{funcdesc}{StandardPutFile}{prompt\, \optional{default}}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
56 Present the user with a standard ``open output file''
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
57 dialog. \var{prompt} is the prompt string, and the optional
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
58 \var{default} argument initializes the output file name. The function
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
59 returns an FSSpec object and a flag indicating that the user completed
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
60 the dialog without cancelling.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
61 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
62
2994
ac0152f63bdd Documented PromptGetFile and optional prompt to GetDirectory.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2941
diff changeset
63 \begin{funcdesc}{GetDirectory}{\optional{prompt}}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
64 Present the user with a non-standard ``select a directory''
2994
ac0152f63bdd Documented PromptGetFile and optional prompt to GetDirectory.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2941
diff changeset
65 dialog. \var{prompt} is the prompt string, and the optional.
ac0152f63bdd Documented PromptGetFile and optional prompt to GetDirectory.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2941
diff changeset
66 Return an FSSpec object and a success-indicator.
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
67 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
68
3857
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
69 \begin{funcdesc}{SetFolder}{\optional{fsspec}}
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
70 Set the folder that is initially presented to the user when one of
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
71 the file selection dialogs is presented. \var{Fsspec} should point to
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
72 a file in the folder, not the folder itself (the file need not exist,
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
73 though). If no argument is passed the folder will be set to the
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
74 current directory, i.e. what \code{os.getcwd()} returns.
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
75
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
76 Note that starting with system 7.5 the user can change Standard File
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
77 behaviour with the ``general controls'' controlpanel, thereby making
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
78 this call inoperative.
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
79 \end{funcdesc}
83a95bf70867 Added SetFolder
Guido van Rossum <guido@python.org>
parents: 3194
diff changeset
80
2941
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
81 \begin{funcdesc}{FindFolder}{where\, which\, create}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
82 Locates one of the ``special'' folders that MacOS knows about, such as
3194
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2994
diff changeset
83 the trash or the Preferences folder. \var{Where} is the disk to
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2994
diff changeset
84 search, \var{which} is the 4-char string specifying which folder to
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2994
diff changeset
85 locate. Setting \var{create} causes the folder to be created if it
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2994
diff changeset
86 does not exist. Returns a \code{(vrefnum, dirid)} tuple.
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2994
diff changeset
87
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2994
diff changeset
88 The constants for \var{where} and \var{which} can be obtained from the
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2994
diff changeset
89 standard module \var{MACFS}.
2941
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
90 \end{funcdesc}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
91
4410
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
92 \begin{funcdesc}{FindApplication}{creator}
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
93 Locate the application with 4-char creator code \var{creator}. The
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
94 function returns an FSSpec object pointing to the application.
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
95 \end{funcdesc}
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
96
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
97 \subsection{FSSpec objects}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
98
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
99 \renewcommand{\indexsubitem}{(FSSpec object attribute)}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
100 \begin{datadesc}{data}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
101 The raw data from the FSSpec object, suitable for passing
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
102 to other applications, for instance.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
103 \end{datadesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
104
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
105 \renewcommand{\indexsubitem}{(FSSpec object method)}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
106 \begin{funcdesc}{as_pathname}{}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
107 Return the full pathname of the file described by the FSSpec object.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
108 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
109
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
110 \begin{funcdesc}{as_tuple}{}
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
111 Return the \code{(\var{wdRefNum}, \var{parID}, \var{name})} tuple of the file described
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
112 by the FSSpec object.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
113 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
114
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
115 \begin{funcdesc}{NewAlias}{\optional{file}}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
116 Create an Alias object pointing to the file described by this
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
117 FSSpec. If the optional \var{file} parameter is present the alias
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
118 will be relative to that file, otherwise it will be absolute.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
119 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
120
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
121 \begin{funcdesc}{NewAliasMinimal}{}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
122 Create a minimal alias pointing to this file.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
123 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
124
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
125 \begin{funcdesc}{GetCreatorType}{}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
126 Return the 4-char creator and type of the file.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
127 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
128
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
129 \begin{funcdesc}{SetCreatorType}{creator\, type}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
130 Set the 4-char creator and type of the file.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
131 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
132
2941
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
133 \begin{funcdesc}{GetFInfo}{}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
134 Return a FInfo object describing the finder info for the file.
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
135 \end{funcdesc}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
136
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
137 \begin{funcdesc}{SetFInfo}{finfo}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
138 Set the finder info for the file to the values specified in the
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
139 \var{finfo} object.
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
140 \end{funcdesc}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
141
4410
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
142 \begin{funcdesc}{GetDates}{}
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
143 Return a tuple with three floating point values representing the
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
144 creation date, modification date and backup date of the file.
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
145 \end{funcdesc}
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
146
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
147 \begin{funcdesc}{SetDates}{crdate\, moddate\, backupdate}
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
148 Set the creation, modification and backup date of the file. The values
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
149 are in the standard floating point format used for times throughout
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
150 Python.
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
151 \end{funcdesc}
4cef23e1dcca Patches for Mac module docs by Jack
Guido van Rossum <guido@python.org>
parents: 3857
diff changeset
152
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
153 \subsection{alias objects}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
154
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
155 \renewcommand{\indexsubitem}{(alias object attribute)}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
156 \begin{datadesc}{data}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
157 The raw data for the Alias record, suitable for storing in a resource
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
158 or transmitting to other programs.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
159 \end{datadesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
160
2576
f47bc5554418 mass changes; fix titles; add examples; correct typos; clarifications;
Guido van Rossum <guido@python.org>
parents: 2527
diff changeset
161 \renewcommand{\indexsubitem}{(alias object method)}
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
162 \begin{funcdesc}{Resolve}{\optional{file}}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
163 Resolve the alias. If the alias was created as a relative alias you
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
164 should pass the file relative to which it is. Return the FSSpec for
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
165 the file pointed to and a flag indicating whether the alias object
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
166 itself was modified during the search process.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
167 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
168
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
169 \begin{funcdesc}{GetInfo}{num}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
170 An interface to the C routine \code{GetAliasInfo()}.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
171 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
172
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
173 \begin{funcdesc}{Update}{file\, \optional{file2}}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
174 Update the alias to point to the \var{file} given. If \var{file2} is
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
175 present a relative alias will be created.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
176 \end{funcdesc}
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
177
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
178 Note that it is currently not possible to directly manipulate a resource
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
179 as an alias object. Hence, after calling \var{Update} or after
2527
815dfaa6a778 small changes by Soren Larsen
Guido van Rossum <guido@python.org>
parents: 2453
diff changeset
180 \var{Resolve} indicates that the alias has changed the Python program
2452
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
181 is responsible for getting the \var{data} from the alias object and
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
182 modifying the resource.
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
183
9efd408fc9f6 Three down, two to go...
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff changeset
184
2941
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
185 \subsection{FInfo objects}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
186
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
187 See Inside Mac for a complete description of what the various fields
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
188 mean.
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
189
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
190 \renewcommand{\indexsubitem}{(FInfo object attribute)}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
191 \begin{datadesc}{Creator}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
192 The 4-char creator code of the file.
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
193 \end{datadesc}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
194
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
195 \begin{datadesc}{Type}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
196 The 4-char type code of the file.
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
197 \end{datadesc}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
198
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
199 \begin{datadesc}{Flags}
3194
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2994
diff changeset
200 The finder flags for the file as 16-bit integer. The bit values in
05aeb91e3b90 Documented MACFS, macostools, EasyDialogs and FrameWork modules.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2994
diff changeset
201 \var{Flags} are defined in standard module \var{MACFS}.
2941
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
202 \end{datadesc}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
203
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
204 \begin{datadesc}{Location}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
205 A Point giving the position of the file's icon in its folder.
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
206 \end{datadesc}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
207
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
208 \begin{datadesc}{Fldr}
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
209 The folder the file is in (as an integer).
97f7cfabe07e Documented FindFolder, GetFInfo, SetFInfo and the FInfo object.
Jack Jansen <jack.jansen@cwi.nl>
parents: 2576
diff changeset
210 \end{datadesc}