|
|
@ -5,6 +5,7 @@ largest file/directory. It searches directories, getting their size
|
|
|
|
and lists the first file in the largest direcotry.
|
|
|
|
and lists the first file in the largest direcotry.
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import errno
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
import sys
|
|
|
|
|
|
|
|
|
|
|
@ -94,11 +95,15 @@ def main():
|
|
|
|
headfile = directories[0].get_head_file()
|
|
|
|
headfile = directories[0].get_head_file()
|
|
|
|
#headfile = headfile.replace('podcasts/', 'podcast/', 1)
|
|
|
|
#headfile = headfile.replace('podcasts/', 'podcast/', 1)
|
|
|
|
#print headfile
|
|
|
|
#print headfile
|
|
|
|
|
|
|
|
try:
|
|
|
|
sys.stdout.write("%s\n" % headfile)
|
|
|
|
sys.stdout.write("%s\n" % headfile)
|
|
|
|
|
|
|
|
except IOError as e:
|
|
|
|
|
|
|
|
if e.errno == errno.EPIPE:
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
raise e
|
|
|
|
directories[0].remove_head_file()
|
|
|
|
directories[0].remove_head_file()
|
|
|
|
if directories[0].num_files() == 0:
|
|
|
|
if directories[0].num_files() == 0:
|
|
|
|
directories = directories[1:]
|
|
|
|
directories = directories[1:]
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|
|
|
|
main()
|
|
|
|
|
|
|
|
|
|
|
|