2009-12-22 00:29:19 -05:00
|
|
|
# This is a simple test plugin, to make sure everything is working
|
|
|
|
|
|
|
|
__author__="bjschuma"
|
|
|
|
__date__ ="$Dec 21, 2009 8:43:01 PM$"
|
|
|
|
|
|
|
|
|
2009-12-27 20:32:41 -05:00
|
|
|
from bt.file import *
|
2009-12-22 00:29:19 -05:00
|
|
|
from bt.message import write
|
|
|
|
|
|
|
|
|
2009-12-27 20:32:41 -05:00
|
|
|
class Library:
|
|
|
|
def __init__(self):
|
|
|
|
self.files = []
|
2009-12-22 00:29:19 -05:00
|
|
|
|
|
|
|
|
2009-12-27 20:32:41 -05:00
|
|
|
def scan(self, dir):
|
|
|
|
files = ls(dir)
|
|
|
|
for file in files:
|
|
|
|
path = join(dir,file)
|
|
|
|
if checkDir(path)==True:
|
|
|
|
self.scan(path)
|
|
|
|
else:
|
|
|
|
write(path,True)
|
|
|
|
self.files += [path]
|
2009-12-22 00:29:19 -05:00
|
|
|
|
2009-12-27 20:32:41 -05:00
|
|
|
global library
|
|
|
|
library = Library()
|