FileName Property
The destination filename for the encoded data.
Syntax
netcode.getFileName([callback]) netcode.setFileName( fileName, [callback])
Default Value
""
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for the getFileName([callback]) method is defined as:
function(err, data){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'data' is the value returned by the method.
The callback for the setFileName([callback]) method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This property contains the destination filename for the encoded data. When uuencoding, this property contains the filename that is specified in the uuencoded data.
When decoding, if the value of the property is not empty, it shows the class where to write the decoded data. It can be either the filename or the directory where the file should be written. If a directory, it should end with a backslash "\".
After a decode operation, this property contains the filename for the created file. If the file couldn't be created because of an illegal filename, examining this property might give a hint about the reason of the failure.
This property must be set to "" (empty string) after each decode operation since it contains the full specification of the file.
An error occurs if a uuencoding operation is initiated with an empty FileName.
If you want to first check the uuencoded filename before creating it on disk, you may assign an illegal directory name to this property (always use a closing backslash "\" to denote it as directory), then trap the error and check the filename appended to this property.
Data Type
String