public static IVirtualPath GetPath(this IVirtualFileSystem fs, IVirtualPath path)
 {
     if (path is IVirtualFile)
     {
         return(fs.GetFile(path.FullPath));
     }
     if (path is IVirtualFolder)
     {
         return(fs.GetFolder(path.FullPath));
     }
     return(null);
 }
 public static void CopyPathTo(this IVirtualPath path, IVirtualFileSystem dstfs, string newname)
 {
     if (path is IVirtualFile)
     {
         var dstf = dstfs.GetFile(newname);
         ((IVirtualFile)path).CopyFileTo(dstf, CopyFileMode.Copy);
     }
     else
     {
         var dstf = dstfs.GetFolder(newname);
         if (!dstf.Exists())
         {
             dstf.Create();
         }
     }
 }