2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 06:39:11 +00:00

get pathlist added

git-svn-id: https://svn.fhem.de/fhem/trunk@1913 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-10-03 09:51:48 +00:00
parent 1eec12cee5
commit 085f2d70ee
2 changed files with 37 additions and 17 deletions

View File

@ -39,6 +39,7 @@ sub FW_textfield($$$);
sub FW_updateHashes();
sub FW_zoomLink($$$);
sub pF($@);
sub FW_PathList();
sub FW_pH(@);
sub FW_pHPlain(@);
sub FW_pO(@);
@ -2432,20 +2433,37 @@ FW_devState($$)
}
#####################################
sub
FW_PathList()
{
return "web server root: $FW_dir\n".
"icon directory: $FW_icondir\n".
"doc directory: $FW_docdir\n".
"css directory: $FW_cssdir\n".
"gplot directory: $FW_gplotdir\n".
"javascript directory: $FW_jsdir";
}
sub
FW_Get($@)
{
my ($hash, @a) = @_;
return "syntax error" if(int(@a) != 3);
return "Unknown argument $a[1], choose one of " . "icon"
unless($a[1] eq "icon");
$FW_wname= $hash->{NAME};
if($a[1] eq "icon") {
return "need one icon as argument" if(int(@a) != 3);
my $icon= FW_IconPath($a[2]);
return defined($icon) ? $icon : "no such icon";
} elsif($a[1] eq "pathlist") {
return FW_PathList();
} else {
return "Unknown argument $a[1], choose one of icon pathlist";
}
}
@ -2456,8 +2474,7 @@ FW_Set($@)
{
my ($hash, @a) = @_;
return "syntax error" if(int(@a) != 2);
return "no set value specified" if(@a < 2);
return "Unknown argument $a[1], choose one of " . "rereadicons"
unless($a[1] eq "rereadicons");

View File

@ -9505,12 +9505,15 @@ KlikAanKlikUit, NEXA, CHACON, HomeEasy UK. <br> You need to define an RFXtrx433
<a name="FHEMWEBget"></a>
<b>Get</b>
<ul>
<code>get &lt;name&gt; icon &lt;logical icon&gt;</code>
<br><br>
returns the absolute path to the logical icon. Example:<br><br>
<li>icon &lt;logical icon&gt;<br>
returns the absolute path to the logical icon. Example:
<ul>
<code>get myFHEMWEB icon FS20.on<br>
/data/Homeautomation/fhem/FHEM/FS20.on.png
</code>
</ul>
<li>pathlist<br>
return FHEMWEB specific directories, where files for given types are located
<br><br>
</ul>