diff options
author | hut <hut@lavabit.com> | 2009-11-27 10:49:48 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-11-27 10:49:48 +0100 |
commit | 9506fb8e79f2d04a1ab78039bacdbee7b22109b5 (patch) | |
tree | 3d5c682e9c5032a1c23be6a98c9d3d6e7c8224b5 /code/directory.rb | |
parent | 5822dff7d91472bf2fc337c68f144e0ce1de09ae (diff) | |
download | ranger-9506fb8e79f2d04a1ab78039bacdbee7b22109b5.tar.gz |
more VROOM
Diffstat (limited to 'code/directory.rb')
-rw-r--r-- | code/directory.rb | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/code/directory.rb b/code/directory.rb deleted file mode 100644 index 5c6e84c1..00000000 --- a/code/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 |