コード例 #1
0
    def quarantine(self):
        """
        In the case that a file is corrupted, move it to a quarantined
        area to allow replication to fix it.

        :returns: if quarantine is successful, path to quarantined
                  directory otherwise None
        """
        if not (self.is_deleted() or self.quarantined_dir):
            self.quarantined_dir = quarantine_renamer(self.device_path,
                                                      self.data_file)
            return self.quarantined_dir
コード例 #2
0
ファイル: server.py プロジェクト: Nupta/swift
    def quarantine(self):
        """
        In the case that a file is corrupted, move it to a quarantined
        area to allow replication to fix it.

        :returns: if quarantine is successful, path to quarantined
                  directory otherwise None
        """
        if not (self.is_deleted() or self.quarantined_dir):
            self.quarantined_dir = quarantine_renamer(self.device_path,
                                                      self.data_file)
            return self.quarantined_dir
コード例 #3
0
ファイル: server.py プロジェクト: sun7shines/Cloudfs
 def quarantine(self):
     
     if not (self.is_deleted() or self.quarantined_dir):
         self.quarantined_dir = quarantine_renamer(self.device_path,
                                                   self.data_file)
         return self.quarantined_dir