X-Git-Url: https://git.phdru.name/?p=extfs.d.git;a=blobdiff_plain;f=dummy;h=5e580b516787f431158ba05c089f780498aa1927;hp=29457ee97e3e0d1635d653ddc7af67dfc8d4ff88;hb=33d85a6e446c83e9b5f9142d540cb502dcac2e05;hpb=9191b2a817c400864b94fff563dca756ac4b869f diff --git a/dummy b/dummy index 29457ee..5e580b5 100755 --- a/dummy +++ b/dummy @@ -9,9 +9,9 @@ License: GPL. """ -__version__ = "0.2.0" -__revision__ = "$Id: dummy,v 1.5 2004/06/13 10:18:37 phd Exp $" -__date__ = "$Date: 2004/06/13 10:18:37 $"[7:-2] +__version__ = "1.0.0" +__revision__ = "$Id: dummy,v 1.7 2004/06/13 13:26:57 phd Exp $" +__date__ = "$Date: 2004/06/13 13:26:57 $"[7:-2] __author__ = "Oleg Broytmann " __copyright__ = "Copyright (C) 2004 PhiloSoft Design" @@ -55,6 +55,48 @@ def mcdummy_copyout(): 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() + + +def mcdummy_rm(): + """Remove a file from the VFS""" + # Ignore the VFS name (sys.argv[2]) + dummy_filename = sys.argv[3] + + real_file = open(".dummy.tmp", 'a') + real_file.write("Remove %s\n" % dummy_filename) + real_file.close() + + +def mcdummy_mkdir(): + """Create a directory in the VFS""" + # Ignore the VFS name (sys.argv[2]) + dummy_dirname = sys.argv[3] + + real_file = open(".dummy.tmp", 'a') + real_file.write("Create %s\n" % dummy_dirname) + real_file.close() + + +def mcdummy_rmdir(): + """Remove a directory from the VFS""" + # Ignore the VFS name (sys.argv[2]) + dummy_dirname = sys.argv[3] + + real_file = open(".dummy.tmp", 'a') + real_file.write("Remove %s\n" % dummy_dirname) + real_file.close() + + g = globals() command = sys.argv[1] procname = "mcdummy_" + command