Pkg.FAT — API for parsing FAT12, FAT16 and FAT32 file systems

Overview

The Pkg.FAT module contains the API for parsing FAT12, FAT16 and FAT32 file systems.

Enumerating Files

The following code example demonstrates how to enumerate files in a FAT file system:

from Pro.Core import *
from Pkg.FAT import *

def enumerateFiles(fname):
    c = createContainerFromFile(fname)
    if c.isNull():
        return
    obj = FATObject()
    if not obj.Load(c) or not obj.Initialize():
        return
    it = obj.FSIterator()
    while it.HasNext():
        e = it.Next()
        print(e.Name())

Module API

Pkg.FAT module API.

Classes:

FATObject()

This class represents a FAT12, FAT16, or FAT32 file system.

Attributes:

FAT_TYPE_12

Represents a FAT12 file system.

FAT_TYPE_16

Represents a FAT16 file system.

FAT_TYPE_32

Represents a FAT32 file system.

FAT_TYPE_UNKNOWN

Represents an unknown or unrecognized FAT file system type.

class FATObject

Bases: Pro.Core.CFFObject

This class represents a FAT12, FAT16, or FAT32 file system.

Methods:

GetFATType()

Returns a constant indicating the FAT type (e.g., FAT_TYPE_32).

GetFATTypeName()

Returns the name of the FAT file system type.

GetFATType()int
Returns

Returns a constant indicating the FAT type (e.g., FAT_TYPE_32).

Return type

int

See also GetFATTypeName().

GetFATTypeName()str
Returns

Returns the name of the FAT file system type.

Return type

str

See also GetFATType().

FAT_TYPE_12

Represents a FAT12 file system.

FAT_TYPE_16

Represents a FAT16 file system.

FAT_TYPE_32

Represents a FAT32 file system.

FAT_TYPE_UNKNOWN

Represents an unknown or unrecognized FAT file system type.