Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 /// <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)
 {
 }
Ejemplo n.º 3
0
 /// <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;
 }
Ejemplo n.º 4
0
 /// <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)
 {
 }
Ejemplo n.º 5
0
 /// <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)
 {
 }
Ejemplo n.º 6
0
 /// <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)
 {
 }