SETDFN

Set the default filename path and extension

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall SETDFN([file_spec][, option])

Arguments

file_spec

(optional) A field, literal, or record that contains the filename path and extension to be used as the new default by the runtime. (a)

option

(optional) Flag to indicate where file_spec will be applied: (n)

0 = The non‑ISAM default path and extension (default)

1 = The ISAM default path and extension

2 = Both the ISAM and non‑ISAM default path and extensions

Discussion

The SETDFN subroutine sets the default filename path and extension to be used by the runtime.

If file_spec is missing or null, the original default filename path and extension is restored.

Note

Setting the default path and extension only works on your local machine. xfServer always uses the default path and extension.

On devices, there is no current directory, and we recommend that you use SETDFN to set a default location for temporary files or for files that do not use environment variables for access. Use the appropriate method for your device. For example,

Device

Method

Universal Windows Platform

Windows.ApplicationModel.Package.Current.InstalledLocation.GetFolderAsync(“Assets\\DAT”)

Use a folder in the Assets folder for your application (e.g., Assets\\DAT). These folders should be included in the .appx file for your application.

Android

Android.OS.Environment.ExternalStorageDirectory

iOS

Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)

On OpenVMS, the initial default filename specifications used by the runtime library are SYS$DISK:[].DDF for non‑ISAM operations and SYS$DISK:[].ISM for ISAM operations.