FAT32 Directory Entries and Operations Guide

Slides:



Advertisements
Similar presentations
Module R2 CS450. Next Week R1 is due next Friday ▫Bring manuals in a binder - make sure to have a cover page with group number, module, and date. You.
Advertisements

1 Week 11 FAT32 Boot Sector, Locating Files and Dirs Classes COP4610 / CGS5765 Florida State University.
1 Week 12 FAT32 Utility Operations Guide Classes COP4610 / CGS5765 Florida State University.
File Systems Examples.
Ext2/Ext3 Linux File System Reporter: Po-Liang, Wu.
In this assignment you are going to read floppy disk. You can run ‘mdir’ Unix function to see what output your program should give. FAT-12 MS-DOS file.
11/13/01CS-550 Presentation - Overview of Microsoft disk operating system. 1 An Overview of Microsoft Disk Operating System.
File Management Systems
Lecture 10: The FAT, VFAT, and NTFS Filesystems 6/17/2003 CSCE 590 Summer 2003.
CS 333 Introduction to Operating Systems Class 18 - File System Performance Jonathan Walpole Computer Science Portland State University.
Command Console Tutorial BCIS 3680 Enterprise Programming.
Week 10 Project 3: An Introduction to File Systems
Server Design Discuss Design issues for Servers Review Server Creation in Linux.
Rensselaer Polytechnic Institute CSCI-4210 – Operating Systems David Goldschmidt, Ph.D.
FireRMS SQL Audit, Archiving & Purging Presented by Laura Small FireRMS Quality Assurance.
1 File Systems Chapter Files 6.2 Directories 6.3 File system implementation 6.4 Example file systems.
Lecture 9: The FAT and VFAT Filesystems 6/16/2003 CSCE 590 Summer 2003.
SIMULATED UNIX FILE SYSTEM Implementation in C Tarek Youssef Bipanjit Sihra.
1 Project 3: An Introduction to File Systems CS3430 Operating Systems University of Northern Iowa.
File Systems CSCI What is a file? A file is information that is stored on disks or other external media.
ENGI 3655 Lab Sessions 1Richard Khoury.  Linked Allocation ◦ Section Richard Khoury2.
A+ Guide to Managing and Maintaining Your PC Fifth Edition Chapter 7 Floppy Drives.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
File Storage Organization The majority of space on a device is reserved for the storage of files. When files are created and modified physical blocks are.
DISK THEORY. Disk Theory n How information is stored on disk n How we can take advantage of that when bad things happen.
1 Week 13 FAT32 Utility Operations Guide: rm and rmdir Classes COP4610 / CGS5765 Florida State University.
CS333 Intro to Operating Systems Jonathan Walpole.
File Systems. 2 What is a file? A repository for data Is long lasting (until explicitly deleted).
Lecture 10 Page 1 CS 111 Summer 2013 File Systems Control Structures A file is a named collection of information Primary roles of file system: – To store.
File Systems cs550 Operating Systems David Monismith.
FAT 12 File Format ( ) Alex Milenkovich.
Computer Forensics Hard Drive Format.
FILE MANAGEMENT SYSTEM Group Members RAMOLY Nathan HEMMI Florent AZANGUE Roméo CHOUIKH Jaouher JRIDI Bayrem NINTIDEM Estelle Olivia Supervisor M. TIMSIT.
Chapter 8 File Systems FAT 12/16/32. Defragmentation Defrag a hard drive – Control Panel  System and Security  Administration tools  Defrag hard drive.
1 FAT32 Boot Sector, Locating Files and Dirs Operating Systems CS3430 Sarah Diesburg.
Linux Tutorial Lesson Two *Getting Help in Linux *Data movement and manipulation *Relative and Absolute path *Processes Note: see chapter 1,2,3 from Linux.
SQL IMPLEMENTATION & ADMINISTRATION Indexing & Views.
Buffer Overflow Walk-Through
Jonathan Walpole Computer Science Portland State University
CS522 Advanced database Systems
Chapter 12: File System Implementation
Subversion Reasons to use How it works Subversion important commands
FAT32 Directory Entries and Operations Guide
FAT32 Directory Entries and Operations Guide
File System Structure How do I organize a disk into a file system?
Swapping Segmented paging allows us to have non-contiguous allocations
Project 3: An Introduction to File Systems
Assignment Preliminaries
Intro to PHP & Variables
File Management.
Buffer Overflow Walk-Through
File I/O, Command Line Parameters, Endian-ness
File Managements.
Optimizing Malloc and Free
File Systems Implementation
Topics Introduction to File Input and Output
Orphaned Files What Does That Mean?
File System B. Ramamurthy B.Ramamurthy 11/27/2018.
CTAERN/DOE System Level Counselor Coordinator Profile Entry Initiative
Project 3: An Introduction to File Systems
Lecture 2- Query Processing (continued)
Git CS Fall 2018.
File Analysis with MicroSoft DEBUG
Disk Structure Analysis
CTAERN/DOE System Level Counselor Coordinator Profile Entry Initiative
Scripts In Matlab.
Topics Introduction to File Input and Output
Recap – Intro to Project 3 and FAT32
Lecture Topics: 11/20 HW 7 What happens on a memory reference Traps
File I/O, Command Line Parameters, Endian-ness
Presentation transcript:

FAT32 Directory Entries and Operations Guide Operating Systems CS3430 Sarah Diesburg

Outline Directory entries Project 3 operations Short-name and long-name entries Project 3 operations

Directory Entries

Directory Entries Lists names of files and directories in a directory Types Short-name directory entry Long-name directory entry

Short-name Directory Entry Limits name size to 8 bytes with additional 3 bytes after “.” Compatible with previous FAT versions 32 bytes total size Holds important information about file or dir: Attributes, timestamp, last access date, first cluster number, size

Short-name Directory Entry If DIR_Name[0] == 0xE5, then the directory entry is free (no file or directory name in this entry) If DIR_Name[0] == 0x00, then the directory entry is free (same as for 0xE5), and there are no allocated directory entries after this one

Long-name Directory Entry Backwards-compatible way to allow longer names to be displayed Each long-name directory entry is 32 bytes A long file name can cover a set of long-name directory entries Each set of long-name directory entries must correspond to a short-name directory entry Long-name entries must immediately precede corresponding short-name entry

Long-name Directory Entry Long-name part 1 Two long-name entries are needed to hold the file name Long-name part 2 Short-name

Long-name Directory Entry Long-name part 1 Long-name part 2 Short name entry for the file must exist too Short-name

Long-name Directory Entry Long-name part 1 Long-name entries for this file immediately precede short-name entry Long-name part 2 Short-name

Directory entries Long-name entry for “fatgen103.pdf"

Directory entries Short-name entry for “fatgen103.pdf"

Long-name Directory Entries You can ignore the long directory entries Can just display the short names This makes the project easier

“Dot” Entries All directories (except root directory of entire system) have “.” and “..” directory entries “.” means “this directory” “..” means “the parent directory” Why do you think the root directory does not have these entries?

Directory Entry Attributes Offset 11 in directory entry, 1 byte long ATTR_READ_ONLY 0x01 ATTR_HIDDEN 0x02 ATTR_SYSTEM 0x04 ATTR_VOLUME_ID 0x08 ATTR_DIRECTORY 0x10 ATTR_ARCHIVE 0x20 ATTR_LONG_NAME ATTR_READ_ONLY | ATTR_HIDDEN | ATTR_SYSTEM | ATTR_VOLUME_ID

Utility Operations

FAT32 Utility Oprations Utility recognizes the following built-in commands: info open close size cd ls read

Precautions File or directory must exist before performing operations on it File must be open and flagged for reading before you attempt to read from it Be sure you are reading from the right location Off by 1 byte can throw whole project off

Handling Open Files An open file is a file we allow I/O operations to be performed on read To handle open files, we must maintain a table of files that are open

Opening Files /] open FATINFO.TXT If “FATINFO.TXT” is found in the current directory, open “FATINFO.TXT” In order to find fatinfo.txt, you must be able to interpret the current directory and determine whether fatinfo.txt is part of that directory Once you open fatinfo.txt, store its name in the open file table

open Check if the file is already open Check that the provided file name exists in the requested directory If it exists, add the file to your open file table

close Check that the file name provided exists in your open file table If it does, remove that entry from your open file table

Closing Files /] close FATINFO.TXT Remove this file’s entry from the open file table

ls Make sure that provided directory name is directory and exists in requested directory Seek first data cluster Iterate through and print each directory entry in the cluster If more directory entries left than first cluster can hold, seek next cluster and repeat 3

size Check that provided file name exists in the requested directory Can be accomplished by seeking through the clusters of the requested directory If it does, extract the size information Pay attention to endianness!

cd Check that provided directory name is a directory and exists Alter your current working directory to reflect the change For ease of debugging and use, you may want to alter your prompt to show current working directory

I/O on Open Files /] read “fatinfo.txt” 0 100 Only allow the read if fatinfo.txt is open In order to read fatinfo.txt, you must look into the open file table, look up the address of fatinfo.txt (or store it with its name), and read enough of the data clusters to satisfy the read request

read Make sure file name provided is in open-file table and flagged as read-capable Check that the provided position is valid Check that the requested number of bytes is valid Seek to data cluster corresponding to the requested start position and begin reading If more data to be read, seek the next clusters and repeat 4

Use Cases Be sure to look at the Project 3 Use Cases document and make sure you code acts the same way.