Mosa.FileSystem.FAT.FatFileSystem.Delete C# (CSharp) Метод

Delete() публичный Метод

Deletes the specified file or directory
public Delete ( uint targetCluster, uint directorySector, uint directorySectorIndex ) : void
targetCluster uint The target cluster.
directorySector uint The directory sector.
directorySectorIndex uint Index of the directory sector.
Результат void
        public void Delete(uint targetCluster, uint directorySector, uint directorySectorIndex)
        {
            var entry = new BinaryFormat(partition.ReadBlock(directorySector, 1));

            entry.SetByte(Entry.DOSName + (directorySectorIndex * Entry.EntrySize), (byte)FileNameAttribute.Deleted);

            partition.WriteBlock(directorySector, 1, entry.Data);

            FreeClusterChain(targetCluster);
        }