Source for file example.php
Documentation is available at example.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2003 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Author: Ian Eure <ieure@php.net> |
// +----------------------------------------------------------------------+
// $Id: example.php 157959 2004-05-04 19:50:01Z ieure $
require_once 'File/Fstab.php';
// Get an instance for the system's fstab.
// Get the entry for the root partition.
$rootEnt = &$sysTab->getEntryForPath ('/');
// See how error handling is set.
if ($rootEnt->hasMountOption ('errors')) {
print "Error handling for / is: ". $rootEnt->mountOptions ['errors']. "\n";
print "Error handling for / is undefined.\n";
print "Chanking fstype for ". $rootEnt->getDeviceUUIDOrLabel (). " (mounted on ". $rootEnt->getMountPoint (). ") to reiserfs\n";
$rootEnt->fsType = 'reiserfs';
print "Adding entry for CD-ROM\n";
$ent->device = '/dev/cdrom';
$ent->mountPoint = '/cdrom';
$ent->fsType = 'iso9660';
$ent->setMountOption ('user');
$sysTab->addEntry (&$ent);
print "Saving modified fstab to /tmp/newtab\n";
$res = $sysTab->save ('/tmp/newtab');
if (PEAR ::isError ($res)) {
die ($res->getMessage (). "\n");
Documentation generated on Mon, 11 Mar 2019 15:39:47 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|