]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/Python/Common/LongFilePathOsPath.py
BaseTools: Replace StandardError with Expression
[mirror_edk2.git] / BaseTools / Source / Python / Common / LongFilePathOsPath.py
CommitLineData
1be2ed90
HC
1## @file\r
2# Override built in module os.path to provide support for long file path\r
3#\r
4# Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>\r
5# This program and the accompanying materials\r
6# are licensed and made available under the terms and conditions of the BSD License\r
7# which accompanies this distribution. The full text of the license may be found at\r
8# http://opensource.org/licenses/bsd-license.php\r
9#\r
10# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12#\r
13\r
14import os\r
15from Common.LongFilePathSupport import LongFilePath\r
16\r
17def isfile(path):\r
18 return os.path.isfile(LongFilePath(path))\r
19\r
20def isdir(path):\r
21 return os.path.isdir(LongFilePath(path))\r
22\r
23def exists(path):\r
24 return os.path.exists(LongFilePath(path))\r
25\r
26def getsize(filename):\r
27 return os.path.getsize(LongFilePath(filename))\r
28\r
29def getmtime(filename):\r
30 return os.path.getmtime(LongFilePath(filename))\r
31\r
32def getatime(filename):\r
33 return os.path.getatime(LongFilePath(filename))\r
34\r
35def getctime(filename):\r
36 return os.path.getctime(LongFilePath(filename))\r
37\r
38join = os.path.join\r
39splitext = os.path.splitext\r
40splitdrive = os.path.splitdrive\r
41split = os.path.split\r
42abspath = os.path.abspath\r
43basename = os.path.basename\r
44commonprefix = os.path.commonprefix\r
45sep = os.path.sep\r
46normpath = os.path.normpath\r
47normcase = os.path.normcase\r
48dirname = os.path.dirname\r
49islink = os.path.islink\r
50isabs = os.path.isabs\r
51realpath = os.path.realpath\r
05cc51ad
LY
52relpath = os.path.relpath\r
53pardir = os.path.pardir\r