示例#1
0
def main():
  args_parser = argparse.ArgumentParser(
      description="Tests get_version.")

  options = args_parser.parse_args()

  try:
    pyvshadow.get_version()
  except Exception:
    return False

  return True
示例#2
0
 def test_get_version(self):
   """Tests the get_version function."""
   version = pyvshadow.get_version()
 def test_get_version(self):
   """Tests the get_version function."""
   version = pyvshadow.get_version()
 def test_get_version(self):
     """Tests the get_version function."""
     version = pyvshadow.get_version()
     self.assertIsNotNone(version)
示例#5
0
"""The Volume Shadow Snapshots (VSS) file system implementation."""

import pyvshadow

# This is necessary to prevent a circular import.
import dfvfs.vfs.vshadow_file_entry

from dfvfs.lib import definitions
from dfvfs.lib import errors
from dfvfs.lib import vshadow
from dfvfs.path import vshadow_path_spec
from dfvfs.resolver import resolver
from dfvfs.vfs import file_system


if pyvshadow.get_version() < '20131209':
  raise ImportWarning(
      'VShadowFileSystem requires at least pyvshadow 20131209.')


class VShadowFileSystem(file_system.FileSystem):
  """Class that implements a file system object using pyvshadow."""

  LOCATION_ROOT = u'/'
  TYPE_INDICATOR = definitions.TYPE_INDICATOR_VSHADOW

  def __init__(self, resolver_context):
    """Initializes the file system object.

    Args:
      resolver_context: the resolver context (instance of resolver.Context).