예제 #1
0
 internal DirectoryEntry(FatFileSystemOptions options, FileName name, FatAttributes attrs, FatType fatVariant)
 {
     _options    = options;
     _fatVariant = fatVariant;
     _name       = name;
     _attr       = (byte)attrs;
 }
예제 #2
0
 internal DirectoryEntry(FatFileSystemOptions options, FileName name, FatAttributes attrs, FatType fatVariant)
 {
     _options = options;
     _fatVariant = fatVariant;
     _name = name;
     _attr = (byte)attrs;
 }
예제 #3
0
 internal DirectoryEntry(FatFileSystemOptions options, Stream stream, FatType fatVariant)
 {
     _options    = options;
     _fatVariant = fatVariant;
     byte[] buffer = StreamUtilities.ReadExact(stream, 32);
     Load(buffer, 0);
 }
예제 #4
0
 internal DirectoryEntry(FatFileSystemOptions options, Stream stream, FatType fatVariant)
 {
     _options = options;
     _fatVariant = fatVariant;
     byte[] buffer = Utilities.ReadFully(stream, 32);
     Load(buffer, 0);
 }
예제 #5
0
 internal DirectoryEntry(DirectoryEntry toCopy)
 {
     _options = toCopy._options;
     _name = toCopy._name;
     _attr = toCopy._attr;
     _creationTimeTenth = toCopy._creationTimeTenth;
     _creationTime = toCopy._creationTime;
     _creationDate = toCopy._creationDate;
     _lastAccessDate = toCopy._lastAccessDate;
     _firstClusterHi = toCopy._firstClusterHi;
     _lastWriteTime = toCopy._lastWriteTime;
     _firstClusterLo = toCopy._firstClusterLo;
     _fileSize = toCopy._fileSize;
 }
 internal DirectoryEntry(DirectoryEntry toCopy)
 {
     _options           = toCopy._options;
     _name              = toCopy._name;
     _attr              = toCopy._attr;
     _creationTimeTenth = toCopy._creationTimeTenth;
     _creationTime      = toCopy._creationTime;
     _creationDate      = toCopy._creationDate;
     _lastAccessDate    = toCopy._lastAccessDate;
     _firstClusterHi    = toCopy._firstClusterHi;
     _lastWriteTime     = toCopy._lastWriteTime;
     _firstClusterLo    = toCopy._firstClusterLo;
     _fileSize          = toCopy._fileSize;
 }
예제 #7
0
 internal DirectoryEntry(DirectoryEntry toCopy)
 {
     _options           = toCopy._options;
     _fatVariant        = toCopy._fatVariant;
     Name               = toCopy.Name;
     _attr              = toCopy._attr;
     _creationTimeTenth = toCopy._creationTimeTenth;
     _creationTime      = toCopy._creationTime;
     _creationDate      = toCopy._creationDate;
     _lastAccessDate    = toCopy._lastAccessDate;
     _firstClusterHi    = toCopy._firstClusterHi;
     _lastWriteTime     = toCopy._lastWriteTime;
     _firstClusterLo    = toCopy._firstClusterLo;
     _fileSize          = toCopy._fileSize;
     _longFileName      = new LongFileName();
     toCopy._longFileName.CopyTo(_longFileName);
 }
예제 #8
0
        public DirectoryEntry GetDirectoryEntry(FatFileSystemOptions options, Stream stream, FatType fileSystemFatVariant)
        {
            byte[] bytes = DirectoryEntryReader.Read(stream);

            ArraySegment <byte>[] directoryEntries = CreateEmptyEntries(bytes);

            string longFilename = string.Empty;

            if (1 < directoryEntries.Length)
            {
                longFilename = ReadLongFilename(directoryEntries);
            }

            int            lastIndex      = directoryEntries.Length - 1;
            DirectoryEntry directoryEntry = DirectoryEntry.CreateFrom(options, directoryEntries[lastIndex], longFilename, fileSystemFatVariant);

            return(directoryEntry);
        }
예제 #9
0
        internal static DirectoryEntry CreateFrom(FatFileSystemOptions options, ArraySegment <byte> entry, string longFilename, FatType fatVariant)
        {
            var directoryEntry = new DirectoryEntry(options, entry.Array, entry.Offset, fatVariant, longFilename);

            return(directoryEntry);
        }
예제 #10
0
 private DirectoryEntry(FatFileSystemOptions options, byte[] buffer, int offset, FatType fatVariant, string longFilename)
 {
     _options    = options;
     _fatVariant = fatVariant;
     Load(buffer, offset, longFilename);
 }
예제 #11
0
 internal DirectoryEntry(FatFileSystemOptions options, FileName name, FatAttributes attrs)
 {
     _options = options;
     _name = name;
     _attr = (byte)attrs;
 }
예제 #12
0
 internal DirectoryEntry(FatFileSystemOptions options, Stream stream)
 {
     _options = options;
     byte[] buffer = Utilities.ReadFully(stream, 32);
     Load(buffer, 0);
 }
 internal DirectoryEntry(FatFileSystemOptions options, FileName name, FatAttributes attrs)
 {
     _options = options;
     _name    = name;
     _attr    = (byte)attrs;
 }
 internal DirectoryEntry(FatFileSystemOptions options, Stream stream)
 {
     _options = options;
     byte[] buffer = Utilities.ReadFully(stream, 32);
     Load(buffer, 0);
 }