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.12 2005/01/03 13:09:23 jan Exp $
  6.  *
  7.  * Copyright 2002-2005 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.  * @version $Revision: 1.12 $
  14.  * @package VFS
  15.  * @since   Horde 2.2
  16.  */
  17. class VFS_ListItem {
  18.  
  19.     /**
  20.      * VFS path
  21.      *
  22.      * @var string $_path 
  23.      */
  24.     var $_path;
  25.  
  26.     /**
  27.      * Filename
  28.      *
  29.      * @var string $_name 
  30.      */
  31.     var $_name;
  32.  
  33.     /**
  34.      * File permissions (*nix format: drwxrwxrwx)
  35.      *
  36.      * @var string $_perms 
  37.      */
  38.     var $_perms;
  39.  
  40.     /**
  41.      * Owner user
  42.      *
  43.      * @var string $_owner 
  44.      */
  45.     var $_owner;
  46.  
  47.     /**
  48.      * Owner group
  49.      *
  50.      * @var string $_group 
  51.      */
  52.     var $_group;
  53.  
  54.     /**
  55.      * Size.
  56.      *
  57.      * @var string $_size 
  58.      */
  59.     var $_size;
  60.  
  61.     /**
  62.      * Last modified date.
  63.      *
  64.      * @var string $_date 
  65.      */
  66.     var $_date;
  67.  
  68.     /**
  69.      * Type
  70.      *   .*      --  File extension
  71.      *   **none  --  Unrecognized type
  72.      *   **sym   --  Symlink
  73.      *   **dir   --  Directory
  74.      *
  75.      * @var string $_type 
  76.      */
  77.     var $_type;
  78.  
  79.     /**
  80.      * Type of target if type is '**sym'.
  81.      * NB. Not all backends are capable of distinguishing all of these.
  82.      *   .*        --  File extension
  83.      *   **none    --  Unrecognized type
  84.      *   **sym     --  Symlink to a symlink
  85.      *   **dir     --  Directory
  86.      *   **broken  --  Target not found - broken link
  87.      *
  88.      * @var string $_linktype 
  89.      */
  90.     var $_linktype;
  91.  
  92.     /**
  93.      * Constructor
  94.      *
  95.      * Requires the path to the file, and it's array of properties,
  96.      * returned from a standard VFS::listFolder() call.
  97.      *
  98.      * @access public
  99.      *
  100.      * @param string $path      The path to the file.
  101.      * @param array $fileArray  An array of file properties.
  102.      */
  103.     function VFS_ListItem($path$fileArray)
  104.     {
  105.         $this->_path $path '/' $fileArray['name'];
  106.         $this->_name $fileArray['name'];
  107.         $this->_dirname $path;
  108.         $this->_perms $fileArray['perms'];
  109.         $this->_owner $fileArray['owner'];
  110.         $this->_group $fileArray['group'];
  111.         $this->_size $fileArray['size'];
  112.         $this->_date $fileArray['date'];
  113.         $this->_type $fileArray['type'];
  114.         $this->_linktype $fileArray['linktype'];
  115.     }
  116.  
  117. }

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