spserver.desktop.url.to.file(url) spserver.desktop.url.map spserver.desktop.webdav.root spserver.desktop.webdav.url spserver.desktop.user.name spserver.desktop.user.credential spserver.desktop.message spserver.desktop.percent
spserver.desktop.url.to.file
returns the argument url,
mapped to a local file name.
The
spserver
library contains functions that can be used when running
S-PLUS code on the Spotfire S+ Server.
This library is automatically attached when a server engine is created.
Developers can also use this library when they are developing S-PLUS code on the desktop,
so they can run and debug functions that call
spserver
library functions
without changing their code.
When the
spserver
library is attached on desktop Spotfire S+,
it is not able to perform all of the operations available on the server.
For example, the WebDAV-access code is not available.
To allow debugging on the desktop,
all of the
spserver
functions
call
spserver.on.server()
to determine whether they are running on the server.
If not, they use the following function and variables
to specify local file directories to be used for reading/writing files
instead of an external WebDAV server.
spserver.desktop.url.to.file
:
This function maps from a URL to a local file name
used to represent the URL when running on the desktop.
Rather than accessing a WebDAV server,
a local file will be read/written/interrogated instead.
The mapping is defined by the variables
spserver.desktop.webdav.url
and
spserver.desktop.webdav.root
(which give the locations of the persistent WebDAV URLs)
and
spserver.desktop.url.map
(for specifying additional user mappings).
In addition, URLs in the
results
subdirectory of
spserver.desktop.webdav.url
are mapped to the
current working directory, which is also used as the results directory
when running on the server.
spserver.desktop.url.map
:
This variable is a named character vector that modifies
how
spserver.desktop.url.to.file
maps
URLs to local file names.
Each of the names on this vector is compared to the URL,
and the first one that matches the beginning of the URL
causes the vector element to replace it.
For example, if this variable was
c("http://server2/foo"="d:/xx")
,
then the URL
http://server2/foo/bar
would be mapped to the
file name
d:/xx/bar
.
The default value of this variable is
character(0)
, but it can be
masked by a user value to define additional maps.
spserver.desktop.webdav.url
,
spserver.desktop.webdav.root
:
These variables specify the file locations to use for storing user and common persistent URLs
as returned by
spserver.url
.
spserver.desktop.webdav.url
specifies a URL used as the base of these persistent URLs.
Subdirectories "common" and "user" are used for the common and user directories.
spserver.desktop.webdav.root
specifies the file location corresponding to this URL.
Their default values are
"http://desktop/SplusServer/webdav"
and
"./desktop"
, but they can be masked by the user.
spserver.desktop.user.name
,
spserver.desktop.user.credential
:
These variables contain the user name and password
returned by
spserver.user.name
and
spserver.user.credential
when running on the desktop.
Their default values are
"desktopuser"
and
"desktopusercredential"
, but they can be masked by the user.
The credential value is set by
spserver.set.user.credential
when running on the desktop.
spserver.desktop.message
:
The function
spserver.set.message
will set this variable in database 1
when called on the desktop.
It can be read to retrieve the message value during debugging.
spserver.desktop.percent
:
The function
spserver.set.percent
will set this variable in database 1
when called on the desktop.
It can be read to retrieve the percent value during debugging.
spserver.desktop.url.to.file(spserver.url("foo"))