Back to index

obnam  1.1
Public Member Functions | Public Attributes
obnamlib.plugins.restore_plugin.Hardlinks Class Reference

List of all members.

Public Member Functions

def __init__
def key
def add
def filename
def forget

Public Attributes

 inodes

Detailed Description

Keep track of inodes with unrestored hardlinks.

Definition at line 25 of file restore_plugin.py.


Constructor & Destructor Documentation

Definition at line 29 of file restore_plugin.py.

00029 
00030     def __init__(self):
00031         self.inodes = dict()
        

Member Function Documentation

def obnamlib.plugins.restore_plugin.Hardlinks.add (   self,
  filename,
  metadata 
)

Definition at line 35 of file restore_plugin.py.

00035 
00036     def add(self, filename, metadata):
00037         self.inodes[self.key(metadata)] = (filename, metadata.st_nlink)
        

Here is the call graph for this function:

Definition at line 38 of file restore_plugin.py.

00038 
00039     def filename(self, metadata):
00040         key = self.key(metadata)
00041         if key in self.inodes:
00042             return self.inodes[key][0]
00043         else:
00044             return None
        

Here is the call graph for this function:

def obnamlib.plugins.restore_plugin.Hardlinks.forget (   self,
  metadata 
)

Definition at line 45 of file restore_plugin.py.

00045 
00046     def forget(self, metadata):
00047         key = self.key(metadata)
00048         filename, nlinks = self.inodes[key]
00049         if nlinks <= 2:
00050             del self.inodes[key]
00051         else:
00052             self.inodes[key] = (filename, nlinks - 1)
00053 

Here is the call graph for this function:

def obnamlib.plugins.restore_plugin.Hardlinks.key (   self,
  metadata 
)

Definition at line 32 of file restore_plugin.py.

00032 
00033     def key(self, metadata):
00034         return '%s:%s' % (metadata.st_dev, metadata.st_ino)
        

Here is the caller graph for this function:


Member Data Documentation

Definition at line 30 of file restore_plugin.py.


The documentation for this class was generated from the following file: