当前位置: 首页>>代码示例>>Python>>正文


Python Fuse.__init__方法代码示例

本文整理汇总了Python中fuse.Fuse.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Fuse.__init__方法的具体用法?Python Fuse.__init__怎么用?Python Fuse.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fuse.Fuse的用法示例。


在下文中一共展示了Fuse.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
    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)
开发者ID:Ajzak,项目名称:abacusfs,代码行数:28,代码来源:abacus-fs.py

示例2: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
    def __init__(self, *args, **kw):
        """
        Init main UNFS class.
        """

        self.file_class = None
        Fuse.__init__(self, *args, **kw)
开发者ID:dsturnbull,项目名称:unfs,代码行数:9,代码来源:unfs.py

示例3: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
    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)
开发者ID:jdreed,项目名称:pyhesiodfs,代码行数:28,代码来源:pyHesiodFS.py

示例4: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
	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"
开发者ID:a4a881d4,项目名称:fs45g,代码行数:9,代码来源:fs45g.py

示例5: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
 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"
开发者ID:joelsefus,项目名称:paella,代码行数:9,代码来源:paellafuse.py

示例6: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
 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 = "."
开发者ID:zaxebo1,项目名称:tagfilesystem,代码行数:9,代码来源:TagFS.py

示例7: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
	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')
开发者ID:pxa272,项目名称:yavfs,代码行数:32,代码来源:yavfs.py

示例8: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
    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 = 'bacula'
        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)
开发者ID:ZungBang,项目名称:baculafs,代码行数:61,代码来源:FileSystem.py

示例9: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
 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
开发者ID:jldupont,项目名称:m3ufs,代码行数:10,代码来源:m3ufs.py

示例10: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
    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 = '/'
开发者ID:thomasfricke,项目名称:cloudestine,代码行数:10,代码来源:xmp.py

示例11: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
    def __init__(self, *args, **kw):
        Fuse.__init__(self, *args, **kw)

        self.engine = create_engine("mysql://root:[email protected]/")
        self.meta = MetaData()
        self.meta.bind = self.engine
        self.insp = Inspector.from_engine(self.engine)
        print "Init complete."
开发者ID:RaHus,项目名称:sqlfs,代码行数:10,代码来源:sqlfs.py

示例12: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
    def __init__(self, *args, **kw):

        Fuse.__init__(self, *args, **kw)

        self.restore = 0
        self.source = '/'
        self.shares = 20
        self.required = 3
开发者ID:peter-x,项目名称:zfec_fs,代码行数:10,代码来源:zfec_fs.py

示例13: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
	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"
开发者ID:mrozekma,项目名称:SE-Fuse,代码行数:10,代码来源:se-fuse.py

示例14: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
	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
开发者ID:erdavila,项目名称:gitviewfs,代码行数:10,代码来源:gitviewfs.py

示例15: __init__

# 需要导入模块: from fuse import Fuse [as 别名]
# 或者: from fuse.Fuse import __init__ [as 别名]
 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)
开发者ID:leonidg,项目名称:moshfs,代码行数:10,代码来源:client_functions.py


注:本文中的fuse.Fuse.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。