Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/pyfatfs/__init__.py: 58%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

12 statements  

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