File: ListItem.php

package info (click to toggle)
horde3 3.0.4-4sarge7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 15,980 kB
  • ctags: 16,295
  • sloc: php: 68,726; xml: 2,382; sql: 498; makefile: 74; sh: 63; pascal: 6
file content (117 lines) | stat: -rw-r--r-- 2,548 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<?php
/**
 * An item returned from a folder list.
 *
 * $Horde: framework/VFS/VFS/ListItem.php,v 1.11.10.1 2005/01/03 12:19:20 jan Exp $
 *
 * Copyright 2002-2005 Jon Wood <jon@jellybob.co.uk>
 *
 * See the enclosed file COPYING for license information (LGPL). If you
 * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
 *
 * @author  Jon Wood <jon@jellybob.co.uk>
 * @version $Revision: 1.11.10.1 $
 * @package VFS
 * @since   Horde 2.2
 */
class VFS_ListItem {

    /**
     * VFS path
     *
     * @var string $_path
     */
    var $_path;

    /**
     * Filename
     *
     * @var string $_name
     */
    var $_name;

    /**
     * File permissions (*nix format: drwxrwxrwx)
     *
     * @var string $_perms
     */
    var $_perms;

    /**
     * Owner user
     *
     * @var string $_owner
     */
    var $_owner;

    /**
     * Owner group
     *
     * @var string $_group
     */
    var $_group;

    /**
     * Size.
     *
     * @var string $_size
     */
    var $_size;

    /**
     * Last modified date.
     *
     * @var string $_date
     */
    var $_date;

    /**
     * Type
     *   .*      --  File extension
     *   **none  --  Unrecognized type
     *   **sym   --  Symlink
     *   **dir   --  Directory
     *
     * @var string $_type
     */
    var $_type;

    /**
     * Type of target if type is '**sym'.
     * NB. Not all backends are capable of distinguishing all of these.
     *   .*        --  File extension
     *   **none    --  Unrecognized type
     *   **sym     --  Symlink to a symlink
     *   **dir     --  Directory
     *   **broken  --  Target not found - broken link
     *
     * @var string $_linktype
     */
    var $_linktype;

    /**
     * Constructor
     *
     * Requires the path to the file, and it's array of properties,
     * returned from a standard VFS::listFolder() call.
     *
     * @access public
     *
     * @param string $path      The path to the file.
     * @param array $fileArray  An array of file properties.
     */
    function VFS_ListItem($path, $fileArray)
    {
        $this->_path = $path . '/' . $fileArray['name'];
        $this->_name = $fileArray['name'];
        $this->_dirname = $path;
        $this->_perms = $fileArray['perms'];
        $this->_owner = $fileArray['owner'];
        $this->_group = $fileArray['group'];
        $this->_size = $fileArray['size'];
        $this->_date = $fileArray['date'];
        $this->_type = $fileArray['type'];
        $this->_linktype = $fileArray['linktype'];
    }

}