summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-11-29 23:20:20 +0100
committerhut <hut@lavabit.com>2009-11-29 23:20:20 +0100
commit88b00cac7f412c41a745aa21221a5453e470b049 (patch)
tree744315886abdcb2889e363026b68a8a6fc418acc /ranger
parent63436aa6c2fb2a0a87f77ce3294dfc8abec3c3ab (diff)
downloadranger-88b00cac7f412c41a745aa21221a5453e470b049.tar.gz
clean up
Diffstat (limited to 'ranger')
-rw-r--r--ranger/directory.rb66
1 files changed, 0 insertions, 66 deletions
diff --git a/ranger/directory.rb b/ranger/directory.rb
deleted file mode 100644
index 5c6e84c1..00000000
--- a/ranger/directory.rb
+++ /dev/null
@@ -1,66 +0,0 @@
-# A Class that contains data about directories
-class Directory
-	class LoadStatus
-		# @n contains a three bit number: x3x2x1
-		# x1:
-		# 0 = not scheduled
-		# 1 = scheduled
-		# x3x2:
-		# 00 = nothing loaded
-		# 01 = got the list of files
-		# 10 = <undefined>
-		# 11 = got the list of files and entry objects
-		def initialize(n = 0)
-			@n = 0
-		end
-
-		def got_files?
-			# is bit 2 nd 3 == 01
-			return n & 2 == 2
-		end
-
-		def scheduled?
-			# is the first bit 1?
-			return n & 1 == 1
-		end
-
-		def got_objects?
-			return n & 4 == 4
-		end
-		attr_accessor :n
-	end
-
-	def initialize(path)
-		@path = path
-		@status = LoadStatus.new(0)
-		@files = []
-		@sort_time = nil
-		@mtime = nil
-#		@width = 1000
-		@read = false
-		@free_space = nil
-		@empty = true
-		@scheduled = false
-	end
-
-	# {{{ Trivial
-	def inspect
-		return "<Directory: #{path}>"
-	end
-	alias to_s inspect
-
-	def size
-		return @files.size
-	end
-
-	def not_loaded?
-		return @level == 0
-	end
-	def file_list_loaded?
-		return @level >= 1
-	end
-	def ready?
-		return @level >= 2
-	end
-	# }}}
-end
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294