resourceData ?-w win? (delete|save)
With the save subcommand, this command records some document related informations as file system extended attributes. Currently, the following data are saved: The delete subcommand deletes any previously recorded extended attributes. This removes only the attributes that belong to Alpha (see the table below).
Note that the extended attributes are automatically saved by the core if the recordState property of the document is set to 1 (see the [getWinInfo] and [setWinInfo] commands).
If the -w option is not specified, the command applies to the current window. If the window does not correspond to a file on disk, the command raises an error.
Extended attributes can be manipulated from a Terminal window using the xattr command line tool (see the xattr manual page). The following table gives the extended attribute names used by Alpha:
PropertyAttribute nameType
Encoding"net.sf.alpha.enc" string
Selection"net.sf.alpha.sel" 2 integers
Geometry"net.sf.alpha.geo" 4 floats
TabSize"net.sf.alpha.tab" 1 integer
Font"net.sf.alpha.font" string
Wrapping"net.sf.alpha.wrap" boolean
Line Breaking"net.sf.alpha.break" boolean
The value of the encoding attribute has the form name;value where name is the IANA (Internet Assigned Numbers Authority) name of the encoding and value is the number defined by the Core Foundations framework for this encoding. The selection is recorded as 2 long integers corresponding to the current position and the end of the selection (equal to the current position if the selection is empty). The window geometry is recorded as 4 floating numbers corresponding to the usual {x,y,w,h} format. The tab size attribute is an integer, the font attribute is a string and the wrapping attribute is a boolean value (0 or 1).