]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/Python/Common/LongFilePathOs.py
12796b26826d74f4d25e28730a15b42afd3a10b5
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 # This program and the accompanying materials
6 # are licensed and made available under the terms and conditions of the BSD License
7 # which accompanies this distribution. The full text of the license may be found at
8 # http://opensource.org/licenses/bsd-license.php
10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 from . import LongFilePathOsPath
16 from Common
.LongFilePathSupport
import LongFilePath
19 path
= LongFilePathOsPath
21 def access(path
, mode
):
22 return os
.access(LongFilePath(path
), mode
)
28 return os
.remove(LongFilePath(path
))
31 Timeout
= Timeout
+ 0.1
32 return os
.remove(LongFilePath(path
))
35 return os
.removedirs(LongFilePath(name
))
38 return os
.rmdir(LongFilePath(path
))
41 return os
.mkdir(LongFilePath(path
))
43 def makedirs(name
, mode
=0o777):
44 return os
.makedirs(LongFilePath(name
), mode
)
47 return os
.rename(LongFilePath(old
), LongFilePath(new
))
50 return os
.chdir(LongFilePath(path
))
52 def chmod(path
, mode
):
53 return os
.chmod(LongFilePath(path
), mode
)
56 return os
.stat(LongFilePath(path
))
58 def utime(path
, times
):
59 return os
.utime(LongFilePath(path
), times
)
63 uList
= os
.listdir(u
"%s" % LongFilePath(path
))
79 SEEK_SET
= os
.SEEK_SET
80 SEEK_END
= os
.SEEK_END