@@ -104,6 +104,9 @@ def getConfigDir(self):
104
104
def exist (self , entryPath ):
105
105
return self ._get (entryPath ) is not None
106
106
107
+ def registered (self , entryPath ):
108
+ return self ._exists (entryPath )
109
+
107
110
def remove (self , entryPath ):
108
111
elemList = self ._parseEntryPath (entryPath )
109
112
fpath = os .path .join (self .configDir , * elemList )
@@ -285,6 +288,15 @@ def _parseEntryPath(self, entryPath):
285
288
self ._validateElemList (elemList )
286
289
return elemList
287
290
291
+ def _exists (self , entryPath ):
292
+ elemList = self ._parseEntryPath (entryPath )
293
+ fpath = os .path .join (self .configDir , * elemList )
294
+ if os .path .isdir (fpath ):
295
+ return True
296
+ elif os .path .isfile (fpath ):
297
+ return True
298
+ return False
299
+
288
300
def _get (self , entryPath ):
289
301
elemList = self ._parseEntryPath (entryPath )
290
302
fpath = os .path .join (self .configDir , * elemList )
@@ -406,9 +418,6 @@ def __init__(self, configDir):
406
418
self ._types = {}
407
419
self ._labels = {}
408
420
409
- def types (self ):
410
- return
411
-
412
421
def listKnownTypes (self ):
413
422
return list (self ._types .keys ())
414
423
0 commit comments