Esempio n. 1
0
def samefile(path1, path2):
    """Similar to the local version"""

    try:
        stat_tuple1 = base.stat(path1)
        inode1 = stat_tuple1[stat.ST_INO]
        stat_tuple2 = base.stat(path2)
        inode2 = stat_tuple2[stat.ST_INO]
    except OSError, ose:
        return False
Esempio n. 2
0
def exists(path):
    """Similar to the local version"""

    try:
        stat_tuple = base.stat(path)
    except OSError, ose:
        return False
Esempio n. 3
0
def isdir(path):
    """Similar to the local version"""

    try:
        stat_tuple = base.stat(path)
        mode = stat_tuple[stat.ST_MODE]
    except OSError, ose:
        return False
Esempio n. 4
0
def getctime(path):
    """Similar to the local version"""

    stat_tuple = base.stat(path)
    return stat_tuple[stat.ST_CTIME]
Esempio n. 5
0
def getsize(path):
    """Similar to the local version"""

    stat_tuple = base.stat(path)
    return stat_tuple[stat.ST_SIZE]