Linux::Sysfs::Class - sysfs classes
my $class = Linux::Sysfs::Class->open('net'); my @devices = $class->get_devices; $class->close;
Libsysfs provides functions to open sysfs classes.
my $class = Linux::Sysfs::Class->open($name);
Opens up one the class represented by
$namein sysfs in the /sys/class directory. On success, it returns a Linux::Sysfs::Class instance, otherwise undef.
Closes up the Linux::Sysfs::Class instance including its class devices.
my $classdev = $class->get_device($name);
Looks for a device with
$namein this class. Returns a Linux::Sysfs::ClassDevice on success or undef on failure.
my @classdevs = $class->get_devices;
Returns a list of Linux::Sysfs::ClassDevice instances for the given class.
my $name = $class->name;
Returns the class' name.
my $path = $class->path;
Returns the full path to the class in sysfs.
Florian Ragwitz <firstname.lastname@example.org>
COPYRIGHT & LICENSE
Copyright 2006 Florian Ragwitz, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA.