1 ## @file 2 # Override built in module os.path to provide support for long file path 3 # 4 # Copyright (c) 2014, 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 9 # 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. 12 # 13 14 import os 15 from Common.LongFilePathSupport import LongFilePath 16 17 def isfile(path): 18 return os.path.isfile(LongFilePath(path)) 19 20 def isdir(path): 21 return os.path.isdir(LongFilePath(path)) 22 23 def exists(path): 24 return os.path.exists(LongFilePath(path)) 25 26 def getsize(filename): 27 return os.path.getsize(LongFilePath(filename)) 28 29 def getmtime(filename): 30 return os.path.getmtime(LongFilePath(filename)) 31 32 def getatime(filename): 33 return os.path.getatime(LongFilePath(filename)) 34 35 def getctime(filename): 36 return os.path.getctime(LongFilePath(filename)) 37 38 join = os.path.join 39 splitext = os.path.splitext 40 splitdrive = os.path.splitdrive 41 split = os.path.split 42 abspath = os.path.abspath 43 basename = os.path.basename 44 commonprefix = os.path.commonprefix 45 sep = os.path.sep 46 normpath = os.path.normpath 47 normcase = os.path.normcase 48 dirname = os.path.dirname 49 islink = os.path.islink 50 isabs = os.path.isabs 51 realpath = os.path.realpath 52 relpath = os.path.relpath 53 pardir = os.path.pardir 54