]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/Common/LongFilePathOs.py
2 # Override built in module os to provide support for long file path
4 # Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.<BR>
5 # SPDX-License-Identifier: BSD-2-Clause-Patent
8 from __future__
import absolute_import
10 from . import LongFilePathOsPath
11 from Common
.LongFilePathSupport
import LongFilePath
14 path
= LongFilePathOsPath
16 def access(path
, mode
):
17 return os
.access(LongFilePath(path
), mode
)
23 return os
.remove(LongFilePath(path
))
26 Timeout
= Timeout
+ 0.1
27 return os
.remove(LongFilePath(path
))
30 return os
.removedirs(LongFilePath(name
))
33 return os
.rmdir(LongFilePath(path
))
36 return os
.mkdir(LongFilePath(path
))
38 def makedirs(name
, mode
=0o777):
39 return os
.makedirs(LongFilePath(name
), mode
)
42 return os
.rename(LongFilePath(old
), LongFilePath(new
))
45 return os
.chdir(LongFilePath(path
))
47 def chmod(path
, mode
):
48 return os
.chmod(LongFilePath(path
), mode
)
51 return os
.stat(LongFilePath(path
))
53 def utime(path
, times
):
54 return os
.utime(LongFilePath(path
), times
)
58 uList
= os
.listdir(u
"%s" % LongFilePath(path
))
63 if hasattr(os
, 'replace'):
64 def replace(src
, dst
):
65 return os
.replace(LongFilePath(src
), LongFilePath(dst
))
78 SEEK_SET
= os
.SEEK_SET
79 SEEK_END
= os
.SEEK_END