INNER CODE UNIT · Python
_path_to_unicode
BigDataBiology/SemiBin · SemiBin/atomicwrite.py:21
def _path_to_unicode(x): # pragma: no cover
if not isinstance(x, str):
return x.decode(sys.getfilesystemencoding())
return x
_proper_fsync = os.fsync
if sys.platform != 'win32':
if fcntl and hasattr(fcntl, 'F_FULLFSYNC'):
def _proper_fsync(fd):
# https://lists.apple.com/archives/darwin-dev/2005/Feb/msg00072.html
# https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/fsync.2.html
# https://github.com/untitaker/python-atomicwrites/issues/6
fcntl.fcntl(fd, fcntl.F_FULLFSYNC)
def _sync_directory(directory):