X-Git-Url: https://git.phdru.name/?p=extfs.d.git;a=blobdiff_plain;f=dummy;h=0baad44d1922675295dadaa871d021acd95220a2;hp=9f070a5449f44b708413d3d4b5095b3620e6af9e;hb=55cf826cae5cf0c3a135c6b377488f089f2d50b8;hpb=ecf538471d5e688e1e8b32580d9d17af5d10d8f2 diff --git a/dummy b/dummy index 9f070a5..0baad44 100755 --- a/dummy +++ b/dummy @@ -9,9 +9,9 @@ License: GPL. """ -__version__ = "0.1.2" -__revision__ = "$Id: dummy,v 1.4 2004/06/13 10:05:30 phd Exp $" -__date__ = "$Date: 2004/06/13 10:05:30 $"[7:-2] +__version__ = "0.3.0" +__revision__ = "$Id: dummy,v 1.6 2004/06/13 10:23:20 phd Exp $" +__date__ = "$Date: 2004/06/13 10:23:20 $"[7:-2] __author__ = "Oleg Broytmann " __copyright__ = "Copyright (C) 2004 PhiloSoft Design" @@ -43,6 +43,30 @@ def mcdummy_list(): print "-r--r--r-- 1 user group 4 Jun 13 02:23 subdir/file4" +def mcdummy_copyout(): + """Extract a file from the VFS""" + # Ignore the VFS name (sys.argv[2]) + dummy_filename = sys.argv[3] + real_filename = sys.argv[4] + + real_file = open(real_filename, 'w') + real_file.write("Copied from %s\n" % dummy_filename) + real_file.write("Copied to %s\n" % real_filename) + real_file.close() + + +def mcdummy_copyin(): + """Put a file to the VFS""" + # Ignore the VFS name (sys.argv[2]) + dummy_filename = sys.argv[3] + real_filename = sys.argv[4] + + real_file = open(real_filename + "-dummy.tmp", 'w') + real_file.write("Copied from %s\n" % real_filename) + real_file.write("Copied to %s\n" % dummy_filename) + real_file.close() + + g = globals() command = sys.argv[1] procname = "mcdummy_" + command