本文整理汇总了C#中System.IO.FileInfo.delete方法的典型用法代码示例。如果您正苦于以下问题:C# FileInfo.delete方法的具体用法?C# FileInfo.delete怎么用?C# FileInfo.delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.IO.FileInfo
的用法示例。
在下文中一共展示了FileInfo.delete方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setUp
public void setUp()
{
FileInfo policyConfigDirectory = net.named_data.jndn.tests.integration_tests.IntegrationTestsCommon
.getPolicyConfigDirectory();
databaseFilePath = new FileInfo(System.IO.Path.Combine(policyConfigDirectory.FullName,"test.db"));
databaseFilePath.delete();
}
示例2: setUp
public void setUp()
{
// Don't show INFO log messages.
ILOG.J2CsMapping.Util.Logging.Logger.getLogger("").setLevel(ILOG.J2CsMapping.Util.Logging.Level.WARNING);
FileInfo policyConfigDirectory = net.named_data.jndn.tests.integration_tests.IntegrationTestsCommon
.getPolicyConfigDirectory();
databaseFilePath = new FileInfo(System.IO.Path.Combine(policyConfigDirectory.FullName,"test-public-info.db"));
databaseFilePath.delete();
identityStorage = new BasicIdentityStorage(System.IO.Path.GetFullPath(databaseFilePath.Name));
identityManager = new IdentityManager(identityStorage,
new FilePrivateKeyStorage());
policyManager = new SelfVerifyPolicyManager(identityStorage);
keyChain = new KeyChain(identityManager, policyManager);
}
示例3: setUp
public void setUp()
{
// Don't show INFO log messages.
ILOG.J2CsMapping.Util.Logging.Logger.getLogger("").setLevel(ILOG.J2CsMapping.Util.Logging.Level.WARNING);
FileInfo policyConfigDirectory = net.named_data.jndn.tests.integration_tests.IntegrationTestsCommon
.getPolicyConfigDirectory();
databaseFilePath = new FileInfo(System.IO.Path.Combine(policyConfigDirectory.FullName,"test.db"));
databaseFilePath.delete();
database = new Sqlite3GroupManagerDb(System.IO.Path.GetFullPath(databaseFilePath.Name));
}
示例4: setUp
public void setUp()
{
// Don't show INFO log messages.
ILOG.J2CsMapping.Util.Logging.Logger.getLogger("").setLevel(ILOG.J2CsMapping.Util.Logging.Level.WARNING);
FileInfo policyConfigDirectory = net.named_data.jndn.tests.integration_tests.IntegrationTestsCommon
.getPolicyConfigDirectory();
dKeyDatabaseFilePath = new FileInfo(System.IO.Path.Combine(policyConfigDirectory.FullName,"manager-d-key-test.db"));
dKeyDatabaseFilePath.delete();
eKeyDatabaseFilePath = new FileInfo(System.IO.Path.Combine(policyConfigDirectory.FullName,"manager-e-key-test.db"));
eKeyDatabaseFilePath.delete();
intervalDatabaseFilePath = new FileInfo(System.IO.Path.Combine(policyConfigDirectory.FullName,"manager-interval-test.db"));
intervalDatabaseFilePath.delete();
groupKeyDatabaseFilePath = new FileInfo(System.IO.Path.Combine(policyConfigDirectory.FullName,"manager-group-key-test.db"));
groupKeyDatabaseFilePath.delete();
RsaKeyParams paras = new RsaKeyParams();
DecryptKey memberDecryptKey = net.named_data.jndn.encrypt.algo.RsaAlgorithm.generateKey(paras);
decryptKeyBlob = memberDecryptKey.getKeyBits();
EncryptKey memberEncryptKey = net.named_data.jndn.encrypt.algo.RsaAlgorithm
.deriveEncryptKey(decryptKeyBlob);
encryptKeyBlob = memberEncryptKey.getKeyBits();
// Generate the certificate.
certificate.setName(new Name("/ndn/memberA/KEY/ksk-123/ID-CERT/123"));
PublicKey contentPublicKey = new PublicKey(encryptKeyBlob);
certificate.setPublicKeyInfo(contentPublicKey);
certificate.encode();
Blob signatureInfoBlob = new Blob(SIG_INFO, false);
Blob signatureValueBlob = new Blob(SIG_VALUE, false);
Signature signature = net.named_data.jndn.encoding.TlvWireFormat.get().decodeSignatureInfoAndValue(
signatureInfoBlob.buf(), signatureValueBlob.buf());
certificate.setSignature(signature);
certificate.wireEncode();
// Set up the keyChain.
MemoryIdentityStorage identityStorage = new MemoryIdentityStorage();
MemoryPrivateKeyStorage privateKeyStorage = new MemoryPrivateKeyStorage();
keyChain = new KeyChain(new IdentityManager(identityStorage,
privateKeyStorage), new NoVerifyPolicyManager());
Name identityName = new Name("TestGroupManager");
keyChain.createIdentityAndCertificate(identityName);
keyChain.getIdentityManager().setDefaultIdentity(identityName);
net.named_data.jndn.encrypt.GroupManager.setFriendAccess(this);
}