GetFileSize() public method

public GetFileSize ( uint directoryBlock, uint index ) : uint
directoryBlock uint
index uint
return uint
示例#1
0
		public FATFileStream (FAT fs, uint startCluster, uint directorySector, uint directoryIndex)
		{
			this.fs = fs;
			this.clusterSize = fs.ClusterSizeInBytes;
			this.data = new byte[clusterSize];
			this.startCluster = startCluster;
			this.directorySector = directorySector;
			this.directoryIndex = directoryIndex;
			this.read = true;
			this.write = false;
			this.position = -1;
			this.dirty = false;
			
			this.nthCluster = UInt32.MaxValue; // Not positioned yet 

			this.lengthOnDisk = fs.GetFileSize (directorySector, directoryIndex);
			this.length = this.lengthOnDisk;

			if (length != 0)
				ReadCluster (startCluster);
		}
示例#2
0
        public FATFileStream(FAT fs, uint startCluster, uint directorySector, uint directoryIndex)
        {
            this.fs              = fs;
            this.clusterSize     = fs.ClusterSizeInBytes;
            this.data            = new byte[clusterSize];
            this.startCluster    = startCluster;
            this.directorySector = directorySector;
            this.directoryIndex  = directoryIndex;
            this.read            = true;
            this.write           = false;
            this.position        = -1;
            this.dirty           = false;

            this.nthCluster = UInt32.MaxValue;             // Not positioned yet

            this.lengthOnDisk = fs.GetFileSize(directorySector, directoryIndex);
            this.length       = this.lengthOnDisk;

            if (length != 0)
            {
                ReadCluster(startCluster);
            }
        }