]> git.phdru.name Git - extfs.d.git/blobdiff - dummy
Changed "Copied" to "Copy".
[extfs.d.git] / dummy
diff --git a/dummy b/dummy
index 9f070a5449f44b708413d3d4b5095b3620e6af9e..30b0188f7e8ea6fe43cd51fae6120f7334300c81 100755 (executable)
--- 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__ = "1.0.1"
+__revision__ = "$Id: dummy,v 1.9 2004/06/13 20:49:36 phd Exp $"
+__date__ = "$Date: 2004/06/13 20:49:36 $"[7:-2]
 __author__ = "Oleg Broytmann <phd@phd.pp.ru>"
 __copyright__ = "Copyright (C) 2004 PhiloSoft Design"
 
@@ -43,6 +43,60 @@ 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, 'a')
+   real_file.write("Copy from %s\n" % dummy_filename)
+   real_file.write("Copy  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", 'a')
+   real_file.write("Copy from %s\n" % real_filename)
+   real_file.write("Copy  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