Class XarDirectoryEntry
Namespace: Aspose.Zip.Xar
Assembly: Aspose.Zip.dll (25.1.0)
يمثل إدخال الدليل داخل أرشيف xar.
public sealed class XarDirectoryEntry : XarEntry
الوراثة
object ← XarEntry ← XarDirectoryEntry
الأعضاء الموروثة
XarEntry.ToString(), XarEntry.Name, XarEntry.FullPath, XarEntry.IsDirectory, XarEntry.Parent, XarEntry.CreationTime, XarEntry.LastAccessTime, XarEntry.LastWriteTime, object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
الخصائص
AllEntries
يحصل على جميع الإدخالات من نوع Aspose.Zip.Xar.XarEntry التي تشكل الدليل بشكل متكرر.
public IEnumerable<xarentry> AllEntries { get; }
قيمة الخاصية
IEnumerable<XarEntry>
Directories
يحصل على إدخالات من نوع Aspose.Zip.Xar.XarDirectoryEntry التي تشكل الدليل.
public IEnumerable<xardirectoryentry> Directories { get; }
قيمة الخاصية
IEnumerable<XarDirectoryEntry>
Files
يحصل على إدخالات من نوع Aspose.Zip.Xar.XarFileEntry التي تشكل الدليل.
public IEnumerable<xarfileentry> Files { get; }
قيمة الخاصية
FilesAndDirectories
يحصل على إدخالات من نوع Aspose.Zip.Xar.XarEntry التي تشكل الدليل.
public IEnumerable<xarentry> FilesAndDirectories { get; }
قيمة الخاصية
IEnumerable<XarEntry>
الطرق
ExtractToDirectory(string)
يستخرج جميع الملفات في الدليل الحالي إلى الدليل المحدد.
public void ExtractToDirectory(string destinationDirectory)
المعلمات
destinationDirectory
string
المسار إلى الدليل لوضع الملفات المستخرجة فيه.
الأمثلة
using (var archive = new XarArchive("archive.xar"))
{
((XarDirectoryEntry)archive.Entries[0]).ExtractToDirectory("C:\\extracted");
}
الملاحظات
إذا لم يكن الدليل موجودًا، فسيتم إنشاؤه.
الاستثناءات
المسار فارغ
المسار أو اسم الملف المحدد، أو كلاهما يتجاوزان الطول الأقصى المحدد من قبل النظام. على سبيل المثال، على الأنظمة القائمة على Windows، يجب أن تكون المسارات أقل من 248 حرفًا ويجب أن تكون أسماء الملفات أقل من 260 حرفًا.
لا يمتلك المتصل الإذن المطلوب للوصول إلى الدليل الموجود.
إذا لم يكن الدليل موجودًا، يحتوي المسار على حرف نقطتين (:) ليس جزءًا من تسمية محرك (“C:").
المسار هو سلسلة بطول صفر، أو يحتوي فقط على مسافات بيضاء، أو يحتوي على حرف أو أكثر غير صالح. يمكنك الاستعلام عن الأحرف غير الصالحة باستخدام طريقة System.IO.Path.GetInvalidPathChars. -أو- المسار مسبوق بـ، أو يحتوي، فقط على حرف نقطتين (:).
الدليل المحدد بواسطة المسار هو ملف. -أو- اسم الشبكة غير معروف.
الأرشيف تالف.