Top  Previous  Next



SetMediaDirectory <directory>








Info: media directory set to <directory>

SyntaxError: insufficient parameters to SetMediaDirectory

SyntaxError: invalid parameters to SetMediaDirectory


Response (immediate socket)







Sets the directory that will be searched for the server for media files (.WAV wave audio files, .BMP bitmap pictures, etc.)


If the server is asked to load a file called file.bmp, it searches for it in the following order:


1.In the media directory specified by the client using SetMediaDirectory (interpreted as a raw pathname);
2.As above, but directory interpreted as relative to the server's default media directory (configured on the server console);
3.In the server's default media directory;
4.As a raw filename. (If a full path is given, e.g. c:\file.bmp, then the absolute path is used; if a simple filename, e.g. file.bmp, is given, then the server searches in the current working directory for its process, typically the directory that the server's .EXE file was started from.)


Note All pathnames are interpreted relative to the server, even if you are running a client on a different computer. It is possible to retrieve files from a different computer. For example, if a machine called client wants a server called server to use a picture on the client's hard disk, it could send a filename as "\\client\client_disk\directory\file.bmp". However, this method should not be unless you have good reason to store the media files remotely from the WhiskerServer machine: the performance of media loading commands will be slower and will depend heavily on network performance and reliability (especially if you need to load media quickly and often).        


Revision history


Implemented by WhiskerServer version 2.3.