desktopdir

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - File handling
Introduced first in SolidGeometry 1.1, Creation date: 2014-11-18, Last change: 2025-09-14

returns the name of the desktop directory path name for PC and MAC

Description

For the later exchange of mac to pc use:
or use variable "filesep" for systen independent concatenation of file names.
if ispc; fname=strfindex(fname,'/','\'); end;


See Also: pcodedirTL , smbFilename , smbPSLibname , workdir , matlabtoolboxdir , matlabdir

Example Illustration

 missing image of desktopdir(Fname,cp)

Syntax

dname=desktopdir([Fname,cp])

Input Parameter

Fname: optional filename relative to desktopdir
cp: copy as desktopdir; 'set' to set or 'reset' to reset

Output Parameter

dname: desktop directory path name

Examples

Just return the desktop directory path:
desktopdir
desktopdir test
desktopdir('test')
desktopdir('test','set')
desktopdir('test')
desktopdir('test','reset')




Copyright 2014-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Last html export of this page out of FM database by TL: 2025-09-21