FileBrowser 0.4 --------------- FileBrowser is a plugin for eboxy which provides a file and directory browsing interface. It operates in conjunction with an eboxy listbox widget. Usage ----- To load the plugin, you need to add a section into your XML file, and add a listbox widget to list the files. Here's a quick example: ... echo "file " + filebrowser.filename + " was chosen" echo "file browser path changed to " + filebrowser.path filebrowser.setup("filelistbox") ... ... The listbox can be have any name you like, as long as you pass that name to the setup method of the filebrowser object. Reference --------- Properties: path The path of the directory to list in the listbox. filename Read-only - the full path and name of the file selected in the list. rootpath The root path for browsing purposes. The file browser will not allow the user to browse to directories above this directory (defaults to "/", ie, unrestricted). pattern Simple file pattern that determines the files to show in the list (eg. "*.jpg"). The wildcards * and ? are supported. showhidden Set to "true" to show hidden files (files with names beginning with .) otherwise "false" (the default). sort Set the sorting method used. Valid methods are: name - Sort by name (alphabetically) size - Sort by file size atime - Sort by last access time ctime - Sort by last file change time mtime - Sort by last modified time dir - Sort with directories at one end of the list, otherwise alphabetically by name (the default). sortdirection Specifies which direction to apply the sorting. Valid values are: forward - beginning to end (default) reverse - sort files in reverse order Methods: setup(listboxname) Sets the file browser up to use the named listbox widget. refresh() Refreshes the list of files and directories. Events: OnPathChange Occurs when the user changes the directory. OnChooseFile Occurs when the user selects a file from the list (by double-clicking or using the accept action - see the eboxy documentation).