private ExFatPartition(Stream partitionStream, ExFatOptions options, bool readBootsector) { if (!partitionStream.CanSeek) { throw new ArgumentException("Given stream must be seekable"); } if (!partitionStream.CanRead) { throw new ArgumentException("Given stream must be readable"); } _partitionStream = partitionStream; _options = options; if (readBootsector) { BootSector = ReadBootSector(_partitionStream); } }
/// <summary> /// Initializes a new instance of the <see cref="ExFatPartition" /> class. /// </summary> /// <param name="partitionStream">The partition stream.</param> /// <param name="options">The options.</param> /// <exception cref="System.ArgumentException">Given stream must be seekable /// or /// Given stream must be readable</exception> public ExFatPartition(Stream partitionStream, ExFatOptions options = ExFatOptions.Default) : this(partitionStream, options, true) { }
/// <summary> /// Initializes a new instance of the <see cref="ExFatEntryFilesystem"/> class. /// </summary> /// <param name="partition">The partition.</param> /// <param name="options">The flags.</param> public ExFatEntryFilesystem(ExFatPartition partition, ExFatOptions options = ExFatOptions.Default) { _options = options; _partition = partition; }
/// <inheritdoc /> /// <summary> /// Initializes a new instance of the <see cref="T:ExFat.Filesystem.ExFatEntryFilesystem" /> class. /// </summary> /// <param name="partitionStream">The partition stream.</param> /// <param name="options">The flags.</param> public ExFatEntryFilesystem(Stream partitionStream, ExFatOptions options = ExFatOptions.Default) : this(new ExFatPartition(partitionStream), options) { }
/// <summary> /// Initializes a new instance of the <see cref="T:ExFat.Filesystem.ExFatPathFilesystem" /> class. /// </summary> /// <param name="partition">The partition.</param> /// <param name="flags">The flags.</param> /// <param name="pathSeparators">The path separators.</param> /// <inheritdoc /> public ExFatPathFilesystem(ExFatPartition partition, ExFatOptions flags = ExFatOptions.Default, char[] pathSeparators = null) : this(new ExFatEntryFilesystem(partition, flags), pathSeparators) { }
/// <summary> /// Initializes a new instance of the <see cref="T:ExFat.Filesystem.ExFatPathFilesystem" /> class. /// </summary> /// <param name="partitionStream">The partition stream.</param> /// <param name="flags">The flags.</param> /// <param name="pathSeparators">The path separators.</param> public ExFatPathFilesystem(Stream partitionStream, ExFatOptions flags = ExFatOptions.Default, char[] pathSeparators = null) : this(new ExFatPartition(partitionStream), flags, pathSeparators) { }