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