NAME
Linux::Sysfs::Class - sysfs classes
SYNOPSIS
my $class = Linux::Sysfs::Class->open('net');
my @devices = $class->get_devices;
$class->close;
DESCRIPTION
Libsysfs provides functions to open sysfs classes.
METHODS
- open
-
my $class = Linux::Sysfs::Class->open($name);
Opens up one the class represented by
$name
in sysfs in the /sys/class directory. On success, it returns a Linux::Sysfs::Class instance, otherwise undef. - close
-
$class->close;
Closes up the Linux::Sysfs::Class instance including its class devices.
- get_device
-
my $classdev = $class->get_device($name);
Looks for a device with
$name
in this class. Returns a Linux::Sysfs::ClassDevice on success or undef on failure. - get_devices
-
my @classdevs = $class->get_devices;
Returns a list of Linux::Sysfs::ClassDevice instances for the given class.
- name
-
my $name = $class->name;
Returns the class' name.
- path
-
my $path = $class->path;
Returns the full path to the class in sysfs.
AUTHOR
Florian Ragwitz <rafl@debian.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.