Package libxyz :: Package vfs :: Module types
[hide private]
[frames] | no frames]

Source Code for Module libxyz.vfs.types

  1  #-*- coding: utf8 -* 
  2  # 
  3  # Max E. Kuznecov ~syhpoon <syhpoon@syhpoon.name> 2008 
  4  # 
  5  # This file is part of XYZCommander. 
  6  # XYZCommander is free software: you can redistribute it and/or modify 
  7  # it under the terms of the GNU Lesser Public License as published by 
  8  # the Free Software Foundation, either version 3 of the License, or 
  9  # (at your option) any later version. 
 10  # XYZCommander is distributed in the hope that it will be useful, 
 11  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
 12  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 13  # GNU Lesser Public License for more details. 
 14  # You should have received a copy of the GNU Lesser Public License 
 15  # along with XYZCommander. If not, see <http://www.gnu.org/licenses/>. 
 16   
17 -class VFSTypeFile(object):
18 """ 19 Regular file type 20 """ 21 22 str_type = u"-" 23 vtype = u" " 24
25 - def __str__(self):
26 return "<Regular file type>"
27 28 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 29
30 - def __repr__(self):
31 return self.__str__()
32 33 #++++++++++++++++++++++++++++++++++++++++++++++++ 34
35 -class VFSTypeBlock(object):
36 """ 37 Block device type 38 """ 39 40 str_type = u"b" 41 vtype = u"+" 42 43 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 44
45 - def __str__(self):
46 return "<Block device type>"
47 48 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 49
50 - def __repr__(self):
51 return self.__str__()
52 53 #++++++++++++++++++++++++++++++++++++++++++++++++ 54
55 -class VFSTypeChar(object):
56 """ 57 Character device type 58 """ 59 60 str_type = u"c" 61 vtype = u"-" 62 63 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 64
65 - def __str__(self):
66 return "<Char device type>"
67 68 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 69
70 - def __repr__(self):
71 return self.__str__()
72 73 #++++++++++++++++++++++++++++++++++++++++++++++++ 74
75 -class VFSTypeDir(object):
76 """ 77 Directory type 78 """ 79 80 str_type = u"d" 81 vtype = u"/" 82 83 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 84
85 - def __str__(self):
86 return "<Directory type>"
87 88 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 89
90 - def __repr__(self):
91 return self.__str__()
92 93 #++++++++++++++++++++++++++++++++++++++++++++++++ 94 112 113 #++++++++++++++++++++++++++++++++++++++++++++++++ 114
115 -class VFSTypeFifo(object):
116 """ 117 FIFO type 118 """ 119 120 str_type = u"p" 121 vtype = u"|" 122 123 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 124
125 - def __str__(self):
126 return "<FIFO type>"
127 128 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 129
130 - def __repr__(self):
131 return self.__str__()
132 133 #++++++++++++++++++++++++++++++++++++++++++++++++ 134
135 -class VFSTypeSocket(object):
136 """ 137 Socket type 138 """ 139 140 str_type = u"s" 141 vtype = u"=" 142 143 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 144
145 - def __str__(self):
146 return "<Socket type>"
147 148 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 149
150 - def __repr__(self):
151 return self.__str__()
152 153 #++++++++++++++++++++++++++++++++++++++++++++++++ 154
155 -class VFSTypeUnknown(object):
156 """ 157 Unknown type 158 """ 159 160 str_type = u"?" 161 162 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 163
164 - def __str__(self):
165 return "<Unknown file type>"
166 167 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 168
169 - def __repr__(self):
170 return self.__str__()
171