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

Documentation generated on Mon, 11 Mar 2019 15:34:54 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.