platform.getTempFile
The 'getTempFile' function creates a file name that is unique in the system temporary directory or the specified directory.
getTempFile函数在系统临时文件夹或用户指定目录生成随机的文件名
- Prototype: platform.getTempFile(sTmpDir, sPrefix, sSuffix);
Parameters:
- sTmpDir: specifies a directory where a temporary filename is created;
创建临时文件的目录 - sPrefix: specifies a prefix for the temporary file name;
临时文件名的前缀 - sSuffix: specifies a extension name for the temporary file name;
临时文件名扩展名
- sTmpDir: specifies a directory where a temporary filename is created;
Return Value: String, a temporary filename is returned;
返回值:String,返回生成的文件名Example:
var sTmpFn=platform.getTempFile('/home/username/temp', '~jj', '.tmp');