예제 #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);
            }
        }
예제 #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)
 {
 }
예제 #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;
 }
예제 #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)
 {
 }
예제 #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)
 {
 }
예제 #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)
 {
 }