Multiuser Lingo Dictionary > Multiuser Lingo Dictionary > getAt()

 

getAt()

Syntax

file("whichFolder").getAt(index)

Description

Multiuser Server server-side function; returns the name, folder, and visible attributes of the file at the specified index in the specified folder. These attributes are returned as a property list of the format [#name: "the folder or filename", #folder: TrueOrFalse, #visible: TrueOrFalse].

The #name property is the name of the file as a string. The #folder property is TRUE if the file is a folder, FALSE if it is a file. The #visible property is TRUE if the file is visible, FALSE if it is invisible.

The function's index parameter is the relative position of the file in the folder: the first file is index 1, the second file is index 2, and so on. The function returns void if there is no file at the specified index.

Example

This server-side statement returns the property list for the third file in the Images folder on the server computer and displays it in the server's console window:

put string( file.("C:\Images").getAt(3) )
-- "[#name: "Sunset.jpg", #folder: 0, #visible: 1]"