ยปCore Development>Code coverage>Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py

Python code coverage for Lib/plat-mac/lib-scriptpackages/SystemEvents/Disk_Folder_File_Suite.py

#countcontent
1n/a"""Suite Disk-Folder-File Suite: Terms and Events for controlling Disks, Folders, and Files
2n/aLevel 1, version 1
3n/a
4n/aGenerated from /System/Library/CoreServices/System Events.app
5n/aAETE/AEUT resource version 1/0, language 0, script 0
6n/a"""
7n/a
8n/aimport aetools
9n/aimport MacOS
10n/a
11n/a_code = 'cdis'
12n/a
13n/aclass Disk_Folder_File_Suite_Events:
14n/a
15n/a _argmap_move = {
16n/a 'to' : 'insh',
17n/a }
18n/a
19n/a def move(self, _object, _attributes={}, **_arguments):
20n/a """move: Move disk item(s) to a new location.
21n/a Required argument: the object for the command
22n/a Keyword argument to: The new location for the disk item(s).
23n/a Keyword argument _attributes: AppleEvent attribute dictionary
24n/a Returns: the reply for the command
25n/a """
26n/a _code = 'core'
27n/a _subcode = 'move'
28n/a
29n/a aetools.keysubst(_arguments, self._argmap_move)
30n/a _arguments['----'] = _object
31n/a
32n/a
33n/a _reply, _arguments, _attributes = self.send(_code, _subcode,
34n/a _arguments, _attributes)
35n/a if _arguments.get('errn', 0):
36n/a raise aetools.Error, aetools.decodeerror(_arguments)
37n/a # XXXX Optionally decode result
38n/a if _arguments.has_key('----'):
39n/a return _arguments['----']
40n/a
41n/a
42n/aclass application(aetools.ComponentItem):
43n/a """application - The Disk-Folder-File Suite host program """
44n/a want = 'capp'
45n/aclass _Prop__3c_Inheritance_3e_(aetools.NProperty):
46n/a """<Inheritance> - All of the properties of the superclass. """
47n/a which = 'c@#^'
48n/a want = 'capp'
49n/a_3c_Inheritance_3e_ = _Prop__3c_Inheritance_3e_()
50n/aclass _Prop_folder_actions_enabled(aetools.NProperty):
51n/a """folder actions enabled - Are Folder Actions currently being processed? """
52n/a which = 'faen'
53n/a want = 'bool'
54n/afolder_actions_enabled = _Prop_folder_actions_enabled()
55n/aclass _Prop_properties(aetools.NProperty):
56n/a """properties - every property of the Disk-Folder-File Suite host program """
57n/a which = 'pALL'
58n/a want = '****'
59n/aproperties = _Prop_properties()
60n/a# element 'cdis' as ['name', 'indx', 'rele', 'rang', 'test']
61n/a# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
62n/a# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
63n/a# element 'cwin' as ['name', 'indx', 'rele', 'rang', 'test', 'ID ']
64n/a# element 'docu' as ['name', 'indx', 'rele', 'rang', 'test']
65n/a# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
66n/a# element 'foac' as ['name', 'indx', 'rele', 'rang', 'test']
67n/a# element 'logi' as ['name', 'indx', 'rele', 'rang', 'test']
68n/a# element 'pcap' as ['name', 'indx', 'rele', 'rang', 'test']
69n/a# element 'pcda' as ['name', 'indx', 'rele', 'rang', 'test']
70n/a# element 'prcs' as ['name', 'indx', 'rele', 'rang', 'test']
71n/a
72n/aapplications = application
73n/a
74n/aclass disk(aetools.ComponentItem):
75n/a """disk - A disk in the file system """
76n/a want = 'cdis'
77n/aclass _Prop_POSIX_path(aetools.NProperty):
78n/a """POSIX path - the POSIX file system path of the disk """
79n/a which = 'posx'
80n/a want = 'utxt'
81n/aclass _Prop_capacity(aetools.NProperty):
82n/a """capacity - the total number of bytes (free or used) on the disk """
83n/a which = 'capa'
84n/a want = 'magn'
85n/aclass _Prop_ejectable(aetools.NProperty):
86n/a """ejectable - Can the media be ejected (floppies, CD's, and so on)? """
87n/a which = 'isej'
88n/a want = 'bool'
89n/aclass _Prop_format(aetools.NProperty):
90n/a """format - the file system format of this disk """
91n/a which = 'dfmt'
92n/a want = 'edfm'
93n/aclass _Prop_free_space(aetools.NProperty):
94n/a """free space - the number of free bytes left on the disk """
95n/a which = 'frsp'
96n/a want = 'magn'
97n/aclass _Prop_ignore_privileges(aetools.NProperty):
98n/a """ignore privileges - Ignore permissions on this disk? """
99n/a which = 'igpr'
100n/a want = 'bool'
101n/aclass _Prop_local_volume(aetools.NProperty):
102n/a """local volume - Is the media a local volume (as opposed to a file server? """
103n/a which = 'isrv'
104n/a want = 'bool'
105n/aclass _Prop_name(aetools.NProperty):
106n/a """name - the name of the disk """
107n/a which = 'pnam'
108n/a want = 'utxt'
109n/aclass _Prop_path(aetools.NProperty):
110n/a """path - the file system path of the disk """
111n/a which = 'ppth'
112n/a want = 'utxt'
113n/aclass _Prop_startup(aetools.NProperty):
114n/a """startup - Is this disk the boot disk? """
115n/a which = 'istd'
116n/a want = 'bool'
117n/aclass _Prop_volume(aetools.NProperty):
118n/a """volume - the volume on which the folder resides """
119n/a which = 'volu'
120n/a want = 'utxt'
121n/a# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
122n/a# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
123n/a# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
124n/a
125n/adisks = disk
126n/a
127n/aclass folder(aetools.ComponentItem):
128n/a """folder - A folder in the file system """
129n/a want = 'cfol'
130n/a# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
131n/a# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
132n/a# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
133n/a# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
134n/a# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
135n/a# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
136n/a
137n/afolders = folder
138n/a
139n/aclass item(aetools.ComponentItem):
140n/a """item - An item in the file system """
141n/a want = 'cobj'
142n/aclass _Prop_busy_status(aetools.NProperty):
143n/a """busy status - Is the item busy? """
144n/a which = 'busy'
145n/a want = 'bool'
146n/aclass _Prop_creation_date(aetools.NProperty):
147n/a """creation date - the date on which the item was created """
148n/a which = 'ascd'
149n/a want = '****'
150n/aclass _Prop_modification_date(aetools.NProperty):
151n/a """modification date - the date on which the item was last modified """
152n/a which = 'asmo'
153n/a want = '****'
154n/aclass _Prop_name_extension(aetools.NProperty):
155n/a """name extension - the extension portion of the name """
156n/a which = 'extn'
157n/a want = 'utxt'
158n/aclass _Prop_package_folder(aetools.NProperty):
159n/a """package folder - Is the item a package? """
160n/a which = 'pkgf'
161n/a want = 'bool'
162n/aclass _Prop_url(aetools.NProperty):
163n/a """url - the url of the item """
164n/a which = 'url '
165n/a want = 'utxt'
166n/aclass _Prop_visible(aetools.NProperty):
167n/a """visible - Is the item visible? """
168n/a which = 'visi'
169n/a want = 'bool'
170n/a# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
171n/a# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
172n/a# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
173n/a
174n/aitems = item
175n/a
176n/aclass file(aetools.ComponentItem):
177n/a """file - A file in the file system """
178n/a want = 'file'
179n/aclass _Prop_creator_type(aetools.NProperty):
180n/a """creator type - the OSType identifying the application that created the item """
181n/a which = 'fcrt'
182n/a want = 'utxt'
183n/aclass _Prop_file_type(aetools.NProperty):
184n/a """file type - the OSType identifying the type of data contained in the item """
185n/a which = 'asty'
186n/a want = 'utxt'
187n/aclass _Prop_physical_size(aetools.NProperty):
188n/a """physical size - the actual space used by the file on disk """
189n/a which = 'phys'
190n/a want = 'magn'
191n/aclass _Prop_product_version(aetools.NProperty):
192n/a """product version - the version of the product (visible at the top of the ?et Info?window) """
193n/a which = 'ver2'
194n/a want = 'utxt'
195n/aclass _Prop_size(aetools.NProperty):
196n/a """size - the logical size of the file """
197n/a which = 'ptsz'
198n/a want = 'magn'
199n/aclass _Prop_stationery(aetools.NProperty):
200n/a """stationery - Is the file a stationery pad? """
201n/a which = 'pspd'
202n/a want = 'bool'
203n/aclass _Prop_version(aetools.NProperty):
204n/a """version - the version of the file (visible at the bottom of the ?et Info?window) """
205n/a which = 'vers'
206n/a want = 'utxt'
207n/a# element 'cfol' as ['name', 'indx', 'rele', 'rang', 'test']
208n/a# element 'cobj' as ['name', 'indx', 'rele', 'rang', 'test']
209n/a# element 'file' as ['name', 'indx', 'rele', 'rang', 'test']
210n/a
211n/afiles = file
212n/aapplication._superclassnames = []
213n/aimport Standard_Suite
214n/aimport Folder_Actions_Suite
215n/aimport Login_Items_Suite
216n/aimport Processes_Suite
217n/aapplication._privpropdict = {
218n/a '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
219n/a 'folder_actions_enabled' : _Prop_folder_actions_enabled,
220n/a 'properties' : _Prop_properties,
221n/a}
222n/aapplication._privelemdict = {
223n/a 'application_process' : Processes_Suite.application_process,
224n/a 'desk_accessory_process' : Processes_Suite.desk_accessory_process,
225n/a 'disk' : disk,
226n/a 'document' : Standard_Suite.document,
227n/a 'file' : file,
228n/a 'folder' : folder,
229n/a 'folder_action' : Folder_Actions_Suite.folder_action,
230n/a 'item' : item,
231n/a 'login_item' : Login_Items_Suite.login_item,
232n/a 'process' : Processes_Suite.process,
233n/a 'window' : Standard_Suite.window,
234n/a}
235n/adisk._superclassnames = ['item']
236n/adisk._privpropdict = {
237n/a 'POSIX_path' : _Prop_POSIX_path,
238n/a '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
239n/a 'capacity' : _Prop_capacity,
240n/a 'ejectable' : _Prop_ejectable,
241n/a 'format' : _Prop_format,
242n/a 'free_space' : _Prop_free_space,
243n/a 'ignore_privileges' : _Prop_ignore_privileges,
244n/a 'local_volume' : _Prop_local_volume,
245n/a 'name' : _Prop_name,
246n/a 'path' : _Prop_path,
247n/a 'properties' : _Prop_properties,
248n/a 'startup' : _Prop_startup,
249n/a 'volume' : _Prop_volume,
250n/a}
251n/adisk._privelemdict = {
252n/a 'file' : file,
253n/a 'folder' : folder,
254n/a 'item' : item,
255n/a}
256n/afolder._superclassnames = ['item']
257n/afolder._privpropdict = {
258n/a 'POSIX_path' : _Prop_POSIX_path,
259n/a '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
260n/a 'name' : _Prop_name,
261n/a 'path' : _Prop_path,
262n/a 'properties' : _Prop_properties,
263n/a 'volume' : _Prop_volume,
264n/a}
265n/afolder._privelemdict = {
266n/a 'file' : file,
267n/a 'file' : file,
268n/a 'folder' : folder,
269n/a 'folder' : folder,
270n/a 'item' : item,
271n/a 'item' : item,
272n/a}
273n/aitem._superclassnames = []
274n/aitem._privpropdict = {
275n/a 'POSIX_path' : _Prop_POSIX_path,
276n/a '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
277n/a 'busy_status' : _Prop_busy_status,
278n/a 'creation_date' : _Prop_creation_date,
279n/a 'modification_date' : _Prop_modification_date,
280n/a 'name' : _Prop_name,
281n/a 'name_extension' : _Prop_name_extension,
282n/a 'package_folder' : _Prop_package_folder,
283n/a 'path' : _Prop_path,
284n/a 'properties' : _Prop_properties,
285n/a 'url' : _Prop_url,
286n/a 'visible' : _Prop_visible,
287n/a 'volume' : _Prop_volume,
288n/a}
289n/aitem._privelemdict = {
290n/a 'file' : file,
291n/a 'folder' : folder,
292n/a 'item' : item,
293n/a}
294n/afile._superclassnames = ['item']
295n/afile._privpropdict = {
296n/a 'POSIX_path' : _Prop_POSIX_path,
297n/a '_3c_Inheritance_3e_' : _Prop__3c_Inheritance_3e_,
298n/a 'creator_type' : _Prop_creator_type,
299n/a 'file_type' : _Prop_file_type,
300n/a 'name' : _Prop_name,
301n/a 'path' : _Prop_path,
302n/a 'physical_size' : _Prop_physical_size,
303n/a 'product_version' : _Prop_product_version,
304n/a 'properties' : _Prop_properties,
305n/a 'size' : _Prop_size,
306n/a 'stationery' : _Prop_stationery,
307n/a 'version' : _Prop_version,
308n/a 'volume' : _Prop_volume,
309n/a}
310n/afile._privelemdict = {
311n/a 'file' : file,
312n/a 'folder' : folder,
313n/a 'item' : item,
314n/a}
315n/a_Enum_edfm = {
316n/a 'MS_2d_DOS_format' : 'dfms', # MS-DOS format
317n/a 'Apple_Photo_format' : 'dfph', # Apple Photo format
318n/a 'ISO_9660_format' : 'df96', # ISO 9660 format
319n/a 'QuickTake_format' : 'dfqt', # QuickTake format
320n/a 'AppleShare_format' : 'dfas', # AppleShare format
321n/a 'High_Sierra_format' : 'dfhs', # High Sierra format
322n/a 'Mac_OS_Extended_format' : 'dfh+', # Mac OS Extended format
323n/a 'UDF_format' : 'dfud', # UDF format
324n/a 'unknown_format' : 'df??', # unknown format
325n/a 'audio_format' : 'dfau', # audio format
326n/a 'Mac_OS_format' : 'dfhf', # Mac OS format
327n/a 'UFS_format' : 'dfuf', # UFS format
328n/a 'NFS_format' : 'dfnf', # NFS format
329n/a 'ProDOS_format' : 'dfpr', # ProDOS format
330n/a 'WebDAV_format' : 'dfwd', # WebDAV format
331n/a}
332n/a
333n/a
334n/a#
335n/a# Indices of types declared in this module
336n/a#
337n/a_classdeclarations = {
338n/a 'capp' : application,
339n/a 'cdis' : disk,
340n/a 'cfol' : folder,
341n/a 'cobj' : item,
342n/a 'file' : file,
343n/a}
344n/a
345n/a_propdeclarations = {
346n/a 'ascd' : _Prop_creation_date,
347n/a 'asmo' : _Prop_modification_date,
348n/a 'asty' : _Prop_file_type,
349n/a 'busy' : _Prop_busy_status,
350n/a 'c@#^' : _Prop__3c_Inheritance_3e_,
351n/a 'capa' : _Prop_capacity,
352n/a 'dfmt' : _Prop_format,
353n/a 'extn' : _Prop_name_extension,
354n/a 'faen' : _Prop_folder_actions_enabled,
355n/a 'fcrt' : _Prop_creator_type,
356n/a 'frsp' : _Prop_free_space,
357n/a 'igpr' : _Prop_ignore_privileges,
358n/a 'isej' : _Prop_ejectable,
359n/a 'isrv' : _Prop_local_volume,
360n/a 'istd' : _Prop_startup,
361n/a 'pALL' : _Prop_properties,
362n/a 'phys' : _Prop_physical_size,
363n/a 'pkgf' : _Prop_package_folder,
364n/a 'pnam' : _Prop_name,
365n/a 'posx' : _Prop_POSIX_path,
366n/a 'ppth' : _Prop_path,
367n/a 'pspd' : _Prop_stationery,
368n/a 'ptsz' : _Prop_size,
369n/a 'url ' : _Prop_url,
370n/a 'ver2' : _Prop_product_version,
371n/a 'vers' : _Prop_version,
372n/a 'visi' : _Prop_visible,
373n/a 'volu' : _Prop_volume,
374n/a}
375n/a
376n/a_compdeclarations = {
377n/a}
378n/a
379n/a_enumdeclarations = {
380n/a 'edfm' : _Enum_edfm,
381n/a}