GetExtendedAttribute() public method

Retrieves the extended attribute.
public GetExtendedAttribute ( string path, string key ) : string
path string Retrrieves attribute of this path.
key string Key of the attribute, which should be retrieved.
return string
 public void GetNullAttributeFromNewFile()
 {
     using (File.Create(path));
     string key = "test";
     var reader = new ExtendedAttributeReaderDos();
     Assert.That(reader.GetExtendedAttribute(path, key) == null);
 }
 public void SetAttributeToFile()
 {
     using (File.Create(path));
     string key = "test";
     string value = "value";
     var reader = new ExtendedAttributeReaderDos();
     reader.SetExtendedAttribute(path, key, value);
     Assert.That(reader.GetExtendedAttribute(path, key).Equals(value));
 }
 public void GetExtendedAttributeOnNonExistingFileThrowsIOException()
 {
     string key = "test";
     var reader = new ExtendedAttributeReaderDos();
     Assert.Throws<FileNotFoundException>(() => reader.GetExtendedAttribute(path, key));
 }
 public void RemoveExtendedAttributeOfFileByPassingNull()
 {
     using (File.Create(path));
     string key = "test";
     var reader = new ExtendedAttributeReaderDos();
     reader.SetExtendedAttribute(path, key, null);
     Assert.That(reader.GetExtendedAttribute(path, key), Is.Null);
     Assert.That(reader.ListAttributeKeys(path).Count == 0);
 }
 public void RemoveAttributeFromFolder()
 {
     Directory.CreateDirectory(path);
     string key = "test";
     string value = "value";
     var reader = new ExtendedAttributeReaderDos();
     reader.SetExtendedAttribute(path, key, value);
     Assert.That(reader.GetExtendedAttribute(path, key).Equals(value));
     reader.RemoveExtendedAttribute(path, key);
     Assert.That(reader.GetExtendedAttribute(path, key) == null);
 }
 public void OverwriteAttributeOnFolder()
 {
     Directory.CreateDirectory(path);
     string key = "test";
     string value = "value";
     string value2 = "value2";
     var reader = new ExtendedAttributeReaderDos();
     reader.SetExtendedAttribute(path, key, value);
     reader.SetExtendedAttribute(path, key, value2);
     Assert.That(reader.GetExtendedAttribute(path, key).Equals(value2));
 }
 public void GetNullAttributeFromNewFolderIfTrailingSlashesAreAvailable()
 {
     Directory.CreateDirectory(path);
     string key = "test";
     var reader = new ExtendedAttributeReaderDos();
     Assert.That(reader.GetExtendedAttribute(path.TrimEnd(Path.DirectorySeparatorChar) + Path.DirectorySeparatorChar, key) == null);
 }
 public void GetNullAttributeFromNewFolder()
 {
     Directory.CreateDirectory(path);
     string key = "test";
     var reader = new ExtendedAttributeReaderDos();
     Assert.That(reader.GetExtendedAttribute(path, key) == null);
 }