Esempio n. 1
0
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)
Esempio n. 2
0
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)
Esempio n. 3
0
def isdir(s):
    try:
        st = mac.stat(s)
    except mac.error:
        return 0
    return S_ISDIR(st[ST_MODE])
Esempio n. 4
0
def exists(s):
    try:
        st = mac.stat(s)
    except mac.error:
        return 0
    return 1
Esempio n. 5
0
def isfile(s):
    try:
        st = mac.stat(s)
    except mac.error:
        return 0
    return S_ISREG(st[ST_MODE])
Esempio n. 6
0
def isdir(s):
	try:
		st = mac.stat(s)
	except mac.error:
		return 0
	return S_ISDIR(st[ST_MODE])
Esempio n. 7
0
def exists(s):
	try:
		st = mac.stat(s)
	except mac.error:
		return 0
	return 1
Esempio n. 8
0
def isfile(s):
	try:
		st = mac.stat(s)
	except mac.error:
		return 0
	return S_ISREG(st[ST_MODE])