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


Python path.ismount方法代码示例

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


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

示例1: find_mount_point

# 需要导入模块: from os import path [as 别名]
# 或者: from os.path import ismount [as 别名]
def find_mount_point(path):
    # Even if something's wrong, "/" is a mount point, so the loop will exit.
    # Use realpath in case it's a symlink
    path = op.realpath(path) # Required to avoid infinite loop
    while not op.ismount(path):
        path = op.split(path)[0]
    return path 
开发者ID:liorbenhorin,项目名称:pipeline,代码行数:9,代码来源:plat_other.py

示例2: ismount

# 需要导入模块: from os import path [as 别名]
# 或者: from os.path import ismount [as 别名]
def ismount(path=("StringPin", "", {PinSpecifires.INPUT_WIDGET_VARIANT: "PathWidget"})):
        '''Return True if pathname path is a mount point: a point in a file system where a different file system has been mounted. The function checks whether path’s parent, path/.., is on a different device than path, or whether path/.. and path point to the same i-node on the same device — this should detect mount points for all Unix and POSIX variants.'''
        return osPath.ismount(path) 
开发者ID:wonderworks-software,项目名称:PyFlow,代码行数:5,代码来源:PathLib.py

示例3: _check_for_directory

# 需要导入模块: from os import path [as 别名]
# 或者: from os.path import ismount [as 别名]
def _check_for_directory():
    checkdirectory = os.getcwd()
    directories_checked = []
    hitch_directory = None

    while not ismount(checkdirectory):
        directories_checked.append(checkdirectory)
        if exists(join(checkdirectory, DOTDIR)):
            hitch_directory = join(checkdirectory, DOTDIR)
            break
        else:
            checkdirectory = abspath(join(checkdirectory, os.pardir))

    return hitch_directory, directories_checked 
开发者ID:hitchtest,项目名称:hitch,代码行数:16,代码来源:hitchdir.py


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