public RemoveExtendedAttribute ( string path, string key ) : void | ||
path | string | Removes attribute from this path. |
key | string | Key of the attribute, which should be removed. |
리턴 | void |
public void RemoveAttributeFromFile() { using (File.Create(path)); string key = "test"; string value = "value"; var reader = new ExtendedAttributeReaderUnix(); reader.SetExtendedAttribute(path, key, value); Assert.That(reader.GetExtendedAttribute(path, key).Equals(value)); reader.RemoveExtendedAttribute(path, key); Assert.That(reader.GetExtendedAttribute(path, key), Is.Null); }
public void RemoveNonExistingAttributeFromFolder() { Directory.CreateDirectory(path); string key = "test"; var reader = new ExtendedAttributeReaderUnix(); reader.RemoveExtendedAttribute(path, key); Assert.That(reader.GetExtendedAttribute(path, key), Is.Null); }
public void RemoveExtendedAttributeOnNonExistingFileThrowsFileNotFoundException() { string key = "test"; var reader = new ExtendedAttributeReaderUnix(); try{ reader.RemoveExtendedAttribute(path, key); } catch (FileNotFoundException) { return; } Assert.Fail("FileNotFoundException not thrown"); }
public void RemoveNonExistingAttributeFromFile() { using (File.Create(path)); string key = "test"; var reader = new ExtendedAttributeReaderUnix(); reader.RemoveExtendedAttribute(path, key); Assert.That(reader.GetExtendedAttribute(path, key), Is.Null); }