VFS
[ class tree: VFS ] [ index: VFS ] [ all elements ]

Source for file ListItem.php

Documentation is available at ListItem.php

  1. <?php
  2. /**
  3.  * An item returned from a folder list.
  4.  *
  5.  * $Horde: framework/VFS/VFS/ListItem.php,v 1.16 2006/01/01 21:10:23 jan Exp $
  6.  *
  7.  * Copyright 2002-2006 Jon Wood <jon@jellybob.co.uk>
  8.  *
  9.  * See the enclosed file COPYING for license information (LGPL). If you
  10.  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  11.  *
  12.  * @author  Jon Wood <jon@jellybob.co.uk>
  13.  * @package VFS
  14.  * @since   Horde 2.2
  15.  */
  16. class VFS_ListItem {
  17.  
  18.     /**
  19.      * VFS path
  20.      *
  21.      * @var string 
  22.      */
  23.     var $_path;
  24.  
  25.     /**
  26.      * Filename
  27.      *
  28.      * @var string 
  29.      */
  30.     var $_name;
  31.  
  32.     /**
  33.      * File permissions (*nix format: drwxrwxrwx)
  34.      *
  35.      * @var string 
  36.      */
  37.     var $_perms;
  38.  
  39.     /**
  40.      * Owner user
  41.      *
  42.      * @var string 
  43.      */
  44.     var $_owner;
  45.  
  46.     /**
  47.      * Owner group
  48.      *
  49.      * @var string 
  50.      */
  51.     var $_group;
  52.  
  53.     /**
  54.      * Size.
  55.      *
  56.      * @var string 
  57.      */
  58.     var $_size;
  59.  
  60.     /**
  61.      * Last modified date.
  62.      *
  63.      * @var string 
  64.      */
  65.     var $_date;
  66.  
  67.     /**
  68.      * Type
  69.      *   .*      --  File extension
  70.      *   **none  --  Unrecognized type
  71.      *   **sym   --  Symlink
  72.      *   **dir   --  Directory
  73.      *
  74.      * @var string 
  75.      */
  76.     var $_type;
  77.  
  78.     /**
  79.      * Type of target if type is '**sym'.
  80.      * NB. Not all backends are capable of distinguishing all of these.
  81.      *   .*        --  File extension
  82.      *   **none    --  Unrecognized type
  83.      *   **sym     --  Symlink to a symlink
  84.      *   **dir     --  Directory
  85.      *   **broken  --  Target not found - broken link
  86.      *
  87.      * @var string 
  88.      */
  89.     var $_linktype;
  90.  
  91.     /**
  92.      * Constructor
  93.      *
  94.      * Requires the path to the file, and it's array of properties,
  95.      * returned from a standard VFS::listFolder() call.
  96.      *
  97.      * @param string $path      The path to the file.
  98.      * @param array $fileArray  An array of file properties.
  99.      */
  100.     function VFS_ListItem($path$fileArray)
  101.     {
  102.         $this->_path $path '/' $fileArray['name'];
  103.         $this->_name $fileArray['name'];
  104.         $this->_dirname $path;
  105.         $this->_perms $fileArray['perms'];
  106.         $this->_owner $fileArray['owner'];
  107.         $this->_group $fileArray['group'];
  108.         $this->_size $fileArray['size'];
  109.         $this->_date $fileArray['date'];
  110.         $this->_type $fileArray['type'];
  111.         $this->_linktype $fileArray['linktype'];
  112.     }
  113.  
  114. }

Documentation generated on Mon, 11 Mar 2019 14:39:00 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.