def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.writeback_time = 0.1 self.lazy_fsdata = True self.cachedir = "/tmp" self.persistence = "persistence" self.root = "root"
def __init__(self, *args, **kwargs): Fuse.__init__(self, *args, **kwargs) self.pathfinder = PathYAVFS() self.config = ConfigYAVFS() # try: if (1): self.vk_sess = vk_api.VkApi(self.config.login, self.config.passwd, app_id=self.config.app) self.vk_sess.authorization() self.vk = self.vk_sess.get_api() self.users = {} self.user_friends = {} self.users['self'] = self.vk.users.get(fields=USER_FIELDS)[0] print "VK Auth ok." pass # except: else: sys.exit(-1) self.dyn = DynamicYAVFS(self) self.filedict = { '/': NodeYAVFS(YAVFS_DIR, '/', dirlist=['users']), '/users': NodeYAVFS(YAVFS_DIR, '/users') } self.user_put_prof_to_fs('/users', 'self', uid='self')
def main(self, *a, **kw): # Setup physical memory if hasattr(self, "domain"): self.xai = pyxa_instance(self.domain) else: self.parser.error("PyXaFS: must provide a Xen domain to mount") Fuse.main(self, *a, **kw)
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.datablocks = {} self.inodes = defaultdict(list) self.set_datablocks() self.set_inodes() self.generate_list(total_inodes) # Calculating number of blocks
def main(self, *a, **kw): # Setup physical memory if hasattr(self, "domain"): self.vm = pyvmi.init(self.domain, "partial") else: self.parser.error("PyVmiFS: must provide a Xen domain to mount") Fuse.main(self, *a, **kw)
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.tdb = TagDB.TagDB(logging) #tdb.loaddb(None) self.lldir = "." TagFS.cur_tagfs = self self.root = "."
def __init__(self, *args, **kwargs): Fuse.__init__(self, *args, **kwargs) openlog('pyhesiodfs', 0, LOG_DAEMON) try: self.fuse_args.add("allow_other", True) except AttributeError: self.allow_other = 1 if sys.platform == 'darwin': self.fuse_args.add("noappledouble", True) self.fuse_args.add("noapplexattr", True) self.fuse_args.add("volname", "MIT") self.fuse_args.add("fsname", "pyHesiodFS") self.attachtab = attachtab(self) self.files = FakeFiles() self.syslog_unavail = True self.syslog_unknown = True self.syslog_success = False # Cache deletions for half a second - should give `ln -nsf` # enough time to make a new symlink self.negcache = defaultdict(negcache)
def __init__(self, file_class=None, *args, **kw): Fuse.__init__(self, *args, **kw) self.log = DUMMY_LOG self._log_cache_dir = None self._mirror_dir = None self.file_class = file_class or MirrorFSFile
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) print 'Starting the FUSE based file system' print '\n' self.root = '/' #if no directory is given the file system is mounted at this directory (now root - can be set to any other). self.file_class = self.XmpFile #We define the name of the file class since we are using a seperate class. global home_dir home_dir = os.getenv("HOME") #Connect to the database self.redis_host = 'localhost' global r r = redis.StrictRedis(host = self.redis_host, port = 6379, db = 0) all_dirs = [x[0] for x in os.walk(home_dir + '/AbacusFS/test')] for directory in all_dirs: directory_pom = directory.split('/') if not 'newcalc' in directory_pom and not '.Trash-1001' in directory_pom: directory_pom = directory_pom[6:] directory_pom = '/'.join(directory_pom) r.delete('in_mem_/'+directory_pom)
def __init__(self, *args, **kw): print "args:", args print "kw:", kw Fuse.__init__(self, *args, **kw) self.conn = PaellaConnection() self.db = PaellaExporter(self.conn) print "Init complete"
def __init__(self, *args, **kwargs): Fuse.__init__(self, *args, **kwargs) self.pathfinder = PathYAVFS() self.config = ConfigYAVFS() # try: if(1): self.vk_sess = vk_api.VkApi(self.config.login, self.config.passwd, app_id = self.config.app) self.vk_sess.authorization() self.vk = self.vk_sess.get_api() self.users = {} self.user_friends = {} self.users['self'] = self.vk.users.get(fields=USER_FIELDS)[0] print "VK Auth ok." pass # except: else: sys.exit(-1) self.dyn = DynamicYAVFS(self) self.filedict = { '/': NodeYAVFS(YAVFS_DIR, '/', dirlist = [ 'users' ] ), '/users': NodeYAVFS(YAVFS_DIR, '/users') } self.user_put_prof_to_fs('/users', 'self', uid='self')
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.writeback_time = 0.1 self.lazy_fsdata=True self.cachedir="/tmp" self.persistence = "persistence" self.root = "root"
def __init__(self, *args, **kw): """ Init main UNFS class. """ self.file_class = None Fuse.__init__(self, *args, **kw)
def __init__(self, *args, **kw): ''' Initialize filesystem ''' self._extract_lock = threading.Lock() self._getattr_lock = threading.Lock() self._bextract_status_lock = threading.Lock() self._bextract_user_intervention_event = threading.Event() self._initialized = False # default option values self.logging = 'info' self.syslog = False self.driver = SQL.SQLITE3 self.database = None self.host = 'localhost' self.port = 0 self.username = '******' self.password = None self.conf = '/etc/bacula/bacula-sd.conf' self.client = '' self.fileset = None self.device = 'FileStorage' self.datetime = None self.recent_job = False self.joblist = None self.cache_prefix = None self.user_cache_path = None self.cleanup = False self.move_root = False self.prefetch_attrs = False self.prefetch_regex = None self.prefetch_symlinks = False self.prefetch_recent = False self.prefetch_diff = None self.prefetch_difflist = None self.prefetch_list = None self.prefetch_everything = False self.batch_mode = False self.batch_list = False self.batch_bsr = False self.batch_extract = False self.use_ino = False self.max_ino = 0 self.dirs = {'/': {'': (FileSystem.null_stat, )}} self._bextract_status = copy.deepcopy(FileSystem.bextract_done) self._bextract_status['pending'] = 0 self._bextract_status['failures'] = 0 class File(FileSystem._File): def __init__(self2, *a, **kw): FileSystem._File.__init__(self2, self, *a, **kw) self.file_class = File Fuse.__init__(self, *args, **kw)
def __init__(self, *args, **kwargs): if 'handlers' in kwargs: global HANDLERS self.handlers = kwargs['handlers'] HANDLERS = self.handlers del kwargs['handlers'] self.file_class = self.MoshFile Fuse.__init__(self, *args, **kwargs)
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) # do stuff to set up your filesystem here, if you want #import thread #thread.start_new_thread(self.mythread, ()) self.root = '/'
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) # do stuff to set up your filesystem here, if you want #import thread #thread.start_new_thread(self.mythread, ()) self.root = None
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) # do stuff to set up your filesystem here, if you want #import thread #thread.start_new_thread(self.mythread, ()) self.repo = self.DEFAULT_REPO self.struct = self.DEFAULT_STRUCT
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.rootNode = Inode('', isDir = True) self.handles = {} # self.rootNode += Inode('test', True) self.rootNode += UsersInode() print "ready"
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) # You can enable multithreading here #import thread #thread.start_new_thread(self.mythread, ()) self.root = '/'
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.engine = create_engine("mysql://*****:*****@localhost/") self.meta = MetaData() self.meta.bind = self.engine self.insp = Inspector.from_engine(self.engine) print "Init complete."
def __init__(self, *args, **kwargs): Fuse.__init__(self, *args, **kwargs) self.commanddir = '/commands' self.infodir = '/info' self.namesdir = '/names' self.privmsgdir = '/' self.statuspath = self.infodir + '/status'
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.rootNode = Inode('', isDir=True) self.handles = {} # self.rootNode += Inode('test', True) self.rootNode += UsersInode() print "ready"
def __init__(self, *args, **kargs): Fuse.__init__(self, *args, **kargs) self.m3u=None self.symlinks={} self.music=[] self.unknown=[] self.m3ufile=None self.logger=None
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.restore = 0 self.source = '/' self.shares = 20 self.required = 3
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) #self.ourfunction() # do stuff to set up your filesystem here, if you want # import thread # thread.start_new_thread(self.mythread, ()) self.root = '/' self.GetContext()
def __init__(self, *args, **kw): # (TO DO) # VALIDATE username, password; Check uid-gid ? # If error: Don't mounte FS # Else: Fuse.__init__(self, *args, **kw) self.root = "/tmp/fuse/" self.file_class = self.JksFile
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.root = "/home/cor/test" self.path_from_hash = {} self.hash_from_path = {} self.hasChanged = {}
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) # do stuff to set up your filesystem here, if you want #import thread #thread.start_new_thread(self.mythread, ()) self.root = OINK_ROOT self.file_class = self.OiNKFile
def __init__(self, *args, **kwargs): Fuse.__init__(self, *args, **kwargs) self.info_handlers = \ { 0xfca00: self.squash_info, 0xddc00: self.nspark_info }
def __init__(self, backup,*args, **kw): Fuse.__init__(self, *args, **kw) config = Config() self.provider = Provider.getInstance('Virgin Media', config) resulttype, result = self.provider.login( config.username, config.password, backup ) if resulttype != "ERROR": print 'Init complete.' else: print result[0]['message']
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.datablocks = {} # { 41 : "This is the content in block 41!" } self.inode_table = defaultdict(list) # { 0 : [41, 21, 213 , 53, 32, 111, 219, 2] } self.inode0 = {} self.free_count = 1 self.read_inode_table() self.read_inode0() self.read_datablocks()
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.serveraddress = "localhost" self.serverport = 104 self.aec = "AEC" self.aet = "DICOMFS" self.localport = 11112 self.cachedir = "/tmp/dicomfs" self.refresh = 999999 self.clearCaches()
def __init__(self, *args, **kw): self.dirs = {} self.files = {} self.msg = {} log('Fusestone Starting...') self.config = kw['config'] self.ks = keystone.API(self.config['host']) print self.ks.login(self.config['user'], self.config['pass']) del kw['config'] Fuse.__init__(self, *args, **kw)
def __init__(self, input_filename, **kw): Fuse.__init__(self, **kw) log.setFilename("/home/haypo/fuse_log") self.hachoir = createParser(input_filename) if True: self.hachoir = createEditor(self.hachoir) self.readonly = False else: self.readonly = True self.fs_charset = "ASCII"
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.serveraddress="localhost" self.serverport=104 self.aec="AEC" self.aet="DICOMFS" self.localport=11112 self.cachedir="/tmp/dicomfs" self.refresh=999999 self.clearCaches()
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.root = '/' try: os.mkdir(CACHE_DIR) # create cache dir except OSError: # path already exists pass tree_str = download_from_vk(tree=True) self.tree = Tree.unmarshal(tree_str)
def __init__(self, *arr, **dic): Fuse.__init__(self, *arr, **dic) self.dirs = {} self.open_mode = None # hold files used by the filesystem # valid files should be removed from it as soon as they are "released" # editor files should be kept # (they will be deleted by the editors with unlink) self.files = {}
def __init__(self, *args, **kwargs): Fuse.__init__(self, *args, **kwargs) self.url = None self.pw = None self.dircache = [] self.dircache_mtx = threading.Lock() self.filecache = [] self.filecache_mtx = threading.Lock()
def __init__(self, default_config_file, *args, **kwargs): """initialize filesystem""" Fuse.__init__(self, *args, **kwargs) self.parser.add_option(mountopt='config', metavar='FILE', default=default_config_file, help="Configuration place [default: %default]") self._users_ = {} self._lastCacheRefresh_ = -1 # first time cache is reloaded self._default_config_file_ = default_config_file
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.parse() self.structure = FSStructure("mysql://fuselib@localhost/fuselib") self.fs = self.structure.getFilesystem(u"test") self.count = self.structure.store.find(FSNode).count() print 'Init complete.' sys.stdout.flush()
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.adb = adb.Adb('/home/napier/bin/adb') class wrapped_file_class(AdbFile): def __init__(self2, *a, **kw): AdbFile.__init__(self2, self.adb, *a, **kw) self.file_class = wrapped_file_class self.cache = {}
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.adb = adb.Adb('/home/napier/bin/adb') class wrapped_file_class (AdbFile): def __init__(self2, *a, **kw): AdbFile.__init__(self2, self.adb, *a, **kw) self.file_class = wrapped_file_class self.cache = { }
def __init__(self, *args, **kw): #Initialize Fuse parent class Fuse.__init__(self, *args, **kw) #Class variable to hold onto random num #we generate for g_rand file self.randBytes = '' #Class variable to track how many times #the read function is invoked/run self.run = 0
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) self.repospath = None self.revision = None self.uid = None self.gid = None self.logfile = None self.send_sigstop = None self.cache_dir = None
def __init__(self, *args, **kwargs): Fuse.__init__(self, *args, **kwargs) class Wrapper(FileProxy): def __init__(self2, *args, **kwargs): FileProxy.__init__(self2, self, *args, **kwargs) self.file_class = Wrapper self.lists = {} import time self.timestamp = int(time.time())
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) # Auth with Pownce unless we have stored credentials try: f = open('%s/.powncefs/auth' % os.path.expanduser('~'), 'r') self.token = oauth.OAuthToken.from_string(f.read()) f.close() except Exception, e: self.token = api.auth() f = open('%s/.powncefs/auth' % os.path.expanduser('~'), 'w') f.write(str(self.token)) f.close()
def __init__(self, *args, **kw): # Pull DB arg out of keywords if (kw.has_key("db")): self.dbname = kw["db"] del kw["db"] Fuse.__init__(self, *args, **kw) # do stuff to set up your filesystem here, if you want #import thread #thread.start_new_thread(self.mythread, ()) self.root = '/'
def __init__(self, *args, **kw): debug("PyFuseMongo.__init__()") Fuse.__init__(self, *args, **kw) # do stuff to set up your filesystem here, if you want #import thread #thread.start_new_thread(self.mythread, ()) self.root = '/' self.mongo = fusemongolib.MongoInterface() self.path = None self.listing = self.mongo.list_files() now = int(time.time()) self.stat = PyFuseMongoStat()
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) if not os.path.exists(root_directory): os.makedirs(root_directory) self.root = root_directory self.file_class = self.HashFSFile # Prendo la struttura per la memorizzazione degli hash self.hash_data_structure = hash_data_structure # Creo la classe per il calcolo dell'hash self.hash_calculator = hash_calculator
def __init__(self, *args, **kw): Fuse.__init__(self, *args, **kw) if True: print "xmp.py:Xmp:mountpoint: %s" % repr(self.mountpoint) print "xmp.py:Xmp:unnamed mount options: %s" % self.optlist print "xmp.py:Xmp:named mount options: %s" % self.optdict # do stuff to set up your filesystem here, if you want #thread.start_new_thread(self.mythread, ()) self.cfg_location = kw['cfg_location'] self.hf = HydraFile.HydraFile(self.cfg_location) self.openfiles = {}