当前位置: 首页>>代码示例>>Python>>正文


Python FileUtils.getFilesOnPath方法代码示例

本文整理汇总了Python中pyaid.file.FileUtils.FileUtils.getFilesOnPath方法的典型用法代码示例。如果您正苦于以下问题:Python FileUtils.getFilesOnPath方法的具体用法?Python FileUtils.getFilesOnPath怎么用?Python FileUtils.getFilesOnPath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyaid.file.FileUtils.FileUtils的用法示例。


在下文中一共展示了FileUtils.getFilesOnPath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: appleProvisioningProfile

# 需要导入模块: from pyaid.file.FileUtils import FileUtils [as 别名]
# 或者: from pyaid.file.FileUtils.FileUtils import getFilesOnPath [as 别名]
    def appleProvisioningProfile(self):
        if self._currentPlatformID != self.IOS_PLATFORM:
            return None

        certPaths = [
            FileUtils.createPath(
                self.platformProjectPath, 'cert', self.buildTypeFolderName, isDir=True),
            FileUtils.createPath(self.platformProjectPath, 'cert', isDir=True) ]

        if self.iosAdHoc:
            certPaths.insert(0, FileUtils.createPath(
                self.platformProjectPath, 'cert', 'adhoc', isDir=True))

        for certPath in certPaths:
            if not os.path.exists(certPath):
                continue

            filename = self.getSetting('PROVISIONING_PROFILE', None)
            if filename is None:
                for path in FileUtils.getFilesOnPath(certPath):
                    if path.endswith('.mobileprovision'):
                        return path
                continue

            filename = filename.replace('\\', '/').strip('/').split('/')
            path     = FileUtils.createPath(certPath, filename, isFile=True)
            if not os.path.exists(path) and os.path.exists(path + '.mobileprovision'):
                path += '.mobileprovision'

            if os.path.exists(path):
                return path

        return None
开发者ID:sernst,项目名称:CompilerDeck,代码行数:35,代码来源:FlexProjectData.py

示例2: certificate

# 需要导入模块: from pyaid.file.FileUtils import FileUtils [as 别名]
# 或者: from pyaid.file.FileUtils.FileUtils import getFilesOnPath [as 别名]
    def certificate(self):
        """Returns the absolute path to the certificate file needed for packaging."""
        certPaths = [
            FileUtils.createPath(
                self.platformProjectPath, 'cert', self.buildTypeFolderName, isDir=True),
            FileUtils.createPath(self.platformProjectPath, 'cert', isDir=True) ]

        for certPath in certPaths:
            if not os.path.exists(certPath):
                continue

            certFileName = self.getSetting('CERTIFICATE')
            if certFileName is None:
                for path in FileUtils.getFilesOnPath(certPath):
                    if path.endswith('.p12'):
                        return path
                continue

            certFileName = certFileName.replace('\\', '/').strip('/').split('/')
            certPath     = FileUtils.createPath(certPath, certFileName, isFile=True)

            if not os.path.exists(certPath) and os.path.exists(certPath + '.p12'):
                certPath += '.p12'

            if os.path.exists(certPath):
                return certPath

        return None
开发者ID:sernst,项目名称:CompilerDeck,代码行数:30,代码来源:FlexProjectData.py

示例3: _createEngineCss

# 需要导入模块: from pyaid.file.FileUtils import FileUtils [as 别名]
# 或者: from pyaid.file.FileUtils.FileUtils import getFilesOnPath [as 别名]
    def _createEngineCss(self):
        resourcePath = StaticFlowEnvironment.rootResourcePath
        sourceFolder = FileUtils.createPath(resourcePath, '..', 'css', isDir=True)
        targetFolder = FileUtils.createPath(resourcePath, 'web', 'css', isDir=True)

        tempPath = FileUtils.createPath(targetFolder, 'engine.temp.css', isFile=True)
        SystemUtils.remove(tempPath)
        destF = open(tempPath, 'a')

        for item in FileUtils.getFilesOnPath(sourceFolder):
            try:
                f = open(item, 'r')
                destF.write('\n' + f.read())
                f.close()
            except Exception , err:
                print 'ERROR: Failed to read CSS file:', item
开发者ID:sernst,项目名称:StaticFlow,代码行数:18,代码来源:WebResourcePackager.py


注:本文中的pyaid.file.FileUtils.FileUtils.getFilesOnPath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。