GNUnet  0.20.0
gnunet_testing.FileExistCondition Class Reference
Inheritance diagram for gnunet_testing.FileExistCondition:
[legend]
Collaboration diagram for gnunet_testing.FileExistCondition:
[legend]

Public Member Functions

def __init__ (self, file)
 
def check (self)
 
def evaluate (self, failed_only)
 
- Public Member Functions inherited from gnunet_testing.Condition
def __init__ (self)
 

Data Fields

 fulfilled
 
 type
 
 file
 
- Data Fields inherited from gnunet_testing.Condition
 fulfilled
 
 type
 

Detailed Description

Definition at line 132 of file gnunet_testing.py.

Constructor & Destructor Documentation

◆ __init__()

def gnunet_testing.FileExistCondition.__init__ (   self,
  file 
)

Reimplemented from gnunet_testing.Condition.

Definition at line 133 of file gnunet_testing.py.

133  def __init__(self, file):
134  self.fulfilled = False
135  self.type = 'file'
136  self.file = file
137 

Member Function Documentation

◆ check()

def gnunet_testing.FileExistCondition.check (   self)

Reimplemented from gnunet_testing.Condition.

Definition at line 138 of file gnunet_testing.py.

138  def check(self):
139  if (self.fulfilled == False):
140  res = os.path.isfile(self.file)
141  if (res == True):
142  self.fulfilled = True
143  return True
144  else:
145  return False
146  else:
147  return True
148 

References GNUNET_FS_FileInformation.file, GNUNET_MESSENGER_MessageBody.file, gnunet_testing.FileExistCondition.file, gnunet_testing.Check.fulfilled, gnunet_testing.Condition.fulfilled, gnunet_testing.FileExistCondition.fulfilled, gnunet_testing.StatisticsCondition.fulfilled, and gnunet_testing.EqualStatisticsCondition.fulfilled.

◆ evaluate()

def gnunet_testing.FileExistCondition.evaluate (   self,
  failed_only 
)

Reimplemented from gnunet_testing.Condition.

Definition at line 149 of file gnunet_testing.py.

149  def evaluate(self, failed_only):
150  if ((self.fulfilled == False) and (failed_only == True)):
151  logger.debug(
152  '%s confition for file %s was %s', str(self.type), self.file,
153  str(self.fulfilled)
154  )
155  elif (failed_only == False):
156  logger.debug(
157  '%s confition for file %s was %s', str(self.type), self.file,
158  str(self.fulfilled)
159  )
160  return self.fulfilled
161 
162 
static int evaluate(void)
Write the ids and their according index in the given array to a file Unused.

References GNUNET_FS_FileInformation.file, GNUNET_MESSENGER_MessageBody.file, gnunet_testing.FileExistCondition.file, gnunet_testing.Check.fulfilled, gnunet_testing.Condition.fulfilled, gnunet_testing.FileExistCondition.fulfilled, gnunet_testing.StatisticsCondition.fulfilled, gnunet_testing.EqualStatisticsCondition.fulfilled, GNUNET_ATS_TEST_Operation.type, PreferenceGenerator.type, PropertyGenerator.type, Network.type, GNUNET_CADET_RequestDropCadetMessage.type, CadetChannel.type, GetContext.type, GetClosestContext.type, GetKeyMessage.type, GetMessage.type, GetZeroAnonymityMessage.type, DataMessage.type, DataRecord.type, Value.type, ZeroAnonByType.type, GNUNET_DHT_ClientGetMessage.type, GNUNET_DHT_ClientResultMessage.type, GNUNET_DHT_ClientPutMessage.type, GNUNET_DHT_MonitorPutMessage.type, GNUNET_DHT_MonitorStartStopMessage.type, GNUNET_DHT_MonitorGetMessage.type, GNUNET_DHT_MonitorGetRespMessage.type, GNUNET_DHT_GetHandle.type, GNUNET_DHT_MonitorHandle.type, ClientQueryRecord.type, ClientMonitorRecord.type, GetActionContext.type, PeerPutMessage.type, PeerResultMessage.type, PeerGetMessage.type, RecentRequest.type, SearchMessage.type, PutMessage.type, ClientPutMessage.type, GNUNET_FS_Uri.type, ProcessResultClosure.type, MetaCounter.type, GNUNET_SEARCH_MetadataPrinterInfo.type, CadetQueryMessage.type, CadetReplyMessage.type, GSF_CadetRequest.type, HandleReplyClosure.type, TestExistClosure.type, ProcessReplyClosure.type, GSF_PendingRequestData.type, MigrationReadyBlock.type, MetaItem.type, MetaDataEntry.type, LookupMessage.type, GNUNET_GNS_LookupWithTldRequest.type, HttpResponseHeader.type, GNUNET_BLOCK_Group.type, GNUNET_MessageHeader.type, GNUNET_DATACACHE_Block.type, GNUNET_DB_EventHeaderP.type, GNUNET_DNSPARSER_Query.type, GNUNET_DNSPARSER_Record.type, GNUNET_GNSRECORD_Block.type, GNUNET_IDENTITY_PrivateKey.type, GNUNET_IDENTITY_PublicKey.type, GNUNET_IDENTITY_Signature.type, GNUNET_MQ_MessageHandler.type, GNUNET_RECLAIM_Attribute.type, GNUNET_RECLAIM_Credential.type, GNUNET_RECLAIM_Presentation.type, GNUNET_SET_Option.type, GNUNET_SETI_Option.type, GNUNET_SETU_Option.type, GNUNET_TESTBED_EventInformation.type, GNUNET_TUN_DnsQueryLine.type, GNUNET_TUN_DnsRecordLine.type, GNUNET_TUN_IcmpHeader.type, gnunet_testing.Condition.type, gnunet_testing.FileExistCondition.type, gnunet_testing.StatisticsCondition.type, gnunet_testing.EqualStatisticsCondition.type, GNUNET_MESSENGER_Operation.type, AutoconfigContext.type, GNUNET_NAT_AutoHandle.type, GNUNET_NAT_AUTO_AutoconfigResultMessage.type, icmp_ttl_exceeded_header.type, icmp_echo_header.type, REGEX_INTERNAL_Automaton.type, PendingMessage.type, GNUNET_STATISTICS_GetHandle.type, ForwardedOperationContext.type, OverlayConnectContext.type, OperationContext.type, OperationQueue.type, TopologyContext.type, GNUNET_TESTBED_UnderlayLinkModel.type, QUIC_header.type, TransportClient.type, GNUNET_SERVER_MessageHandler.type, GNUNET_TRANSPORT_WLAN_Ieee8023Frame.type, GNUNET_BIO_WriteHandle.type, GNUNET_BIO_ReadHandle.type, and GNUNET_NETWORK_Handle.type.

Field Documentation

◆ fulfilled

◆ type

gnunet_testing.FileExistCondition.type

◆ file

gnunet_testing.FileExistCondition.file

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