c# 获取文件信息
2021-03-11 23:29
标签:parse rip add company cat sar one album ret c# 获取文件信息 标签:parse rip add company cat sar one album ret 原文地址:https://www.cnblogs.com/ives/p/12610578.htmlpublic enum AudioValueEnum
{
Name = 0,
Size = 1,
Type = 2,
DateModified = 3,
DateCreated = 4,
DateAccessed = 5,
Attributes = 6,
Offlinestatus = 7,
OfflineAvailability = 8,
PerceivedType = 9,
Owner = 10,
Kinds = 11,
DateTaken = 12,
Artists = 13,
Album = 14,
Year = 15,
Genre = 16,
Conductors = 17,
Tags = 18,
Rating = 19,
Authors = 20,
Title = 21,
Subject = 22,
Categories = 23,
Comments = 24,
Copyright = 25,
///
public class AudioEx
{
public static string GetField(string fileName, AudioValueEnum fieldEnum)
{
string[] Info = new string[7];
ShellClass sh = new ShellClass();
Folder dir = sh.NameSpace(Path.GetDirectoryName(fileName));
FolderItem item = dir.ParseName(Path.GetFileName(fileName));
return dir.GetDetailsOf(item, (int)fieldEnum);
}
}