1# -*- coding: utf-8 -*-
2
3"""
4Python FAT filesystem module with :doc:`PyFilesystem2 <pyfilesystem2:index>` \
5compatibility.
6
7pyfatfs allows interaction with FAT12/16/32 filesystems, either via
8:doc:`PyFilesystem2 <pyfilesystem2:index>` for file-level abstraction
9or direct interaction with the filesystem for low-level access.
10"""
11
12#: Specifies default ("OEM") encoding
13from pyfatfs._exceptions import PyFATException
14
15FAT_OEM_ENCODING = 'ibm437'
16#: Specifies the long file name encoding, which is always UTF-16 (LE)
17FAT_LFN_ENCODING = 'utf-16-le'
18
19
20def _init_check(func):
21 def _wrapper(*args, **kwargs):
22 initialized = args[0].initialized
23
24 if initialized is True:
25 return func(*args, **kwargs)
26 else:
27 raise PyFATException("Class has not yet been fully initialized, "
28 "please instantiate first.")
29
30 return _wrapper