Difference between revisions of "JFTP/syst"
From Joomla! Documentation
< API15:JFTP
(New page: ===Description===
Method to system string from the FTP server
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</n...) |
m (preparing for archive only) |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
− | <nowiki>[< | + | <nowiki>[<! removed edit link to red link >]</nowiki> |
</span> | </span> | ||
− | + | <! removed transcluded page call, red link never existed > | |
===Syntax=== | ===Syntax=== | ||
Line 54: | Line 54: | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
− | <nowiki>[< | + | <nowiki>[<! removed edit link to red link >]</nowiki> |
</span> | </span> | ||
− | + | <! removed transcluded page call, red link never existed > | |
===Examples=== | ===Examples=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=syst | category=syst | ||
category=JFTP | category=JFTP | ||
− | + | namespace=CodeExample | |
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
+ | [[Category:Archived pages API15]] |
Latest revision as of 19:36, 24 March 2017
The "API15" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Method to system string from the FTP server
[<! removed edit link to red link >]
<! removed transcluded page call, red link never existed >
Syntax[edit]
syst()
Returns[edit]
string System identifier string
Defined in[edit]
libraries/joomla/client/ftp.php
Importing[edit]
jimport( 'joomla.client.ftp' );
Source Body[edit]
function syst() {
// If native FTP support is enabled lets use it...
if (FTP_NATIVE) {
if (($ret = @ftp_systype($this->_conn)) === false) {
JError::raiseWarning('35', 'JFTP::syst: Bad response' );
return false;
}
} else {
// Send print working directory command and verify success
if (!$this->_putCmd('SYST', 215)) {
JError::raiseWarning('35', 'JFTP::syst: Bad response', 'Server response: '.$this->_response.' [Expected: 215]' );
return false;
}
$ret = $this->_response;
}
// Match the system string to an OS
if (strpos(strtoupper($ret), 'MAC') !== false) {
$ret = 'MAC';
} elseif (strpos(strtoupper($ret), 'WIN') !== false) {
$ret = 'WIN';
} else {
$ret = 'UNIX';
}
// Return the os type
return $ret;
}
[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >
Examples[edit]
Code Examples[edit]