All pastes #824440 Raw Edit

Mine

public text v1 · immutable
·published 2007-12-19 23:43 UTC
rendered paste body
mountpoints = {'filesrv1':'/export/filesrv1', 'filesrv2':'/mnt/filesrv2'}

write(file, file_path):
    file_id = new_file_id(file_path)
    for mp in mountpoints:
        if mp.free >= size(file):
            mp.write(file, file_id)
            index.add(file_path, file_id, mp)
            
read(file_path): 
    file_id, mp = index.search(file_path)
    return mp.read(file_id)