1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
4
<LANGUAGE>eng</LANGUAGE>
5
<TITLE>pathconvert</TITLE>
6
<TYPE>Scilab Function</TYPE>
7
<DATE>April 1993</DATE>
8
<SHORT_DESCRIPTION name="pathconvert"> pathnames convertion between posix and windows. </SHORT_DESCRIPTION>
10
<CALLING_SEQUENCE_ITEM>paths=pathconvert(paths [,flagtrail [,flagexpand [,type]]]) </CALLING_SEQUENCE_ITEM>
15
<PARAM_NAME>paths</PARAM_NAME>
17
<SP>: a string matrix giving a set of pathnames</SP>
21
<PARAM_NAME>flagtrail,flagexpand</PARAM_NAME>
23
<SP>: boolean optional parameters (default value depends on the MSDOS variable).</SP>
27
<PARAM_NAME>type</PARAM_NAME>
29
<SP>: a string <VERB>'u'</VERB> or <VERB>'w'</VERB>.</SP>
35
<P><VERB>pathconvert</VERB> can be used to convert a set of pathnames
36
(given by a string matrix <VERB>paths</VERB>) from windows native
37
filename to posix-style pathnames and back. The target style
38
is given by the optional string <VERB>type</VERB> which can be
39
<VERB>'u'</VERB> for Unix or <VERB>'w'</VERB> for Windows. The default
40
style is set according to the value of <VERB>MSDOS</VERB>.
41
If <VERB>MSDOS</VERB> is true (resp. false ) then default type is <VERB>'w'</VERB>
42
(resp. <VERB>'u'</VERB>).</P>
44
Windows pathnames starting with <VERB>name:</VERB> are converted to
45
pathnames starting with <VERB>/cygdrive/name/</VERB> using the cygwin
47
<P><VERB>flagtrail</VERB> is an optional boolean parameter. When its value
48
is true a trailing separator (<VERB>'\'</VERB> or <VERB>'/'</VERB>) is added
49
at the end of the path.</P>
50
<P><VERB>flagexpand</VERB> is an optional boolean parameter. When its value
51
is true leading strings like <VERB>HOME</VERB>, <VERB>SCI</VERB> or <VERB>~</VERB> are
52
expanded using environment variables.</P>
56
pathconvert('SCI/macros\util/foo.sci',%f,%f,'u')
57
pathconvert('SCI/macros\util/foo.sci',%f,%f,'w')
58
pathconvert('SCI/macros/util/foo.sci',%f,%t,'w')
59
pathconvert('HOME/macros/util/foo.sci',%t,%t,'w')
60
pathconvert('c:/tmp',%f,%t,'u')
61
pathconvert('/cygdrive/c/tmp',%f,%f,'w')
69
<LINK>listfiles</LINK>