beautypg.com

Status = createdirectory ( newdirectory ), Status = delete ( filename ), Attributes = getattributes ( filename ) – Casio Naurtech CETerm Ver.5.5 Scripting Guide User Manual

Page 44: List = getlist ( pattern )

background image

N

AURTECH

W

EB

B

ROWSER AND

T

ERMINAL

E

MULATION FOR

W

INDOWS

CE

AND

W

INDOWS

M

OBILE




CETerm Scripting Guide

Page 44


status = CreateDirectory ( newDirectory )

Create a new directory. Return true for success, false for failure.
Use the File properties LastError or LastErrorMessge to get additional error
information.

status = Delete ( fileName )

Delete an existing file. Return true for success, false for failure.
Use the File properties LastError or LastErrorMessge to get additional error
information.

attributes = GetAttributes ( fileName )

Return the attributes of the file. Use the File properties LastError or
LastErrorMessge to get additional error information. See Appendix 4 for attribute
definitions.

list = GetList ( pattern )

Return a list of files with names that match a pattern. The pattern specifies a
valid directory or path and file name, which can contain wildcard characters, such
as an asterisk (*) or a question mark (?). You may use forward slashes (/) to
delimit directories. The returned list is in the form of a JavaScript array literal [
…] which contains JavaScript object literals {…} containing information about
every matching file. See Section 2.8 for details about handling JavaScript
literals. Return null if no matching files found. Use the File properties LastError
or LastErrorMessge to get additional error information.

For example the following array literal shows two files and a directory:

[ {name:"myApp.cab", attributes:0x21,
creationTime:new Date(2006,11,15,11,51,41,480),
lastAccessTime:new Date(2007,7,27,3,27,41,0),
lastWriteTime:new Date(2008,6,15,0,29,50,0), size:2455494},
{name:"myconfig.ini", attributes:0x21,
lastAccessTime:new Date(2007,7,27,3,27,18,0),
lastWriteTime:new Date(2008,6,15,0,29,48,0), size:12564},
{name:"AppDirectory", attributes:0x10,
lastWriteTime:new Date(2008,2,11,12,29,49,0), size:1024} ]


Note that the “creationTime” and “lastAccessTime” are not always present and
should be checked for existence before using them. Their existence depends on
the type of Windows filesystem holding the files. See any standard JavaScript

This manual is related to the following products: