コード例 #1
0
ファイル: packmail.py プロジェクト: th-rpy/python-0.9.1
def packnotolder(outfp, dirname, oldest):
    names = mac.listdir(dirname)
    oldest = macpath.cat(dirname, oldest)
    st = mac.stat(oldest)
    mtime = st[ST_MTIME]
    todo = []
    for name in names:
        print name, '...',
        st = mac.stat(macpath.cat(dirname, name))
        if st[ST_MTIME] >= mtime:
            print 'Yes.'
            todo.append(name)
        else:
            print 'No.'
    todo.sort()
    packsome(outfp, dirname, todo)
コード例 #2
0
ファイル: packmail.py プロジェクト: asottile/ancient-pythons
def packnotolder(outfp, dirname, oldest):
       names = mac.listdir(dirname)
       oldest = macpath.cat(dirname, oldest)
       st = mac.stat(oldest)
       mtime = st[ST_MTIME]
       todo = []
       for name in names:
               print name, '...',
               st = mac.stat(macpath.cat(dirname, name))
               if st[ST_MTIME] >= mtime:
                       print 'Yes.'
                       todo.append(name)
               else:
                       print 'No.'
       todo.sort()
       packsome(outfp, dirname, todo)
コード例 #3
0
def isdir(s):
    try:
        st = mac.stat(s)
    except mac.error:
        return 0
    return S_ISDIR(st[ST_MODE])
コード例 #4
0
def exists(s):
    try:
        st = mac.stat(s)
    except mac.error:
        return 0
    return 1
コード例 #5
0
def isfile(s):
    try:
        st = mac.stat(s)
    except mac.error:
        return 0
    return S_ISREG(st[ST_MODE])
コード例 #6
0
ファイル: macpath.py プロジェクト: asottile/ancient-pythons
def isdir(s):
	try:
		st = mac.stat(s)
	except mac.error:
		return 0
	return S_ISDIR(st[ST_MODE])
コード例 #7
0
ファイル: macpath.py プロジェクト: asottile/ancient-pythons
def exists(s):
	try:
		st = mac.stat(s)
	except mac.error:
		return 0
	return 1
コード例 #8
0
ファイル: macpath.py プロジェクト: asottile/ancient-pythons
def isfile(s):
	try:
		st = mac.stat(s)
	except mac.error:
		return 0
	return S_ISREG(st[ST_MODE])