예제 #1
0
    def testSize(self):
        """Test the size property."""
        file_entry = data_range_file_entry.DataRangeFileEntry(
            self._resolver_context, self._file_system,
            self._data_range_path_spec)

        self.assertIsNotNone(file_entry)
        self.assertEqual(file_entry.size, 0x41)
예제 #2
0
  def GetFileEntryByPathSpec(self, path_spec):
    """Retrieves a file entry for a path specification.

    Args:
      path_spec (PathSpec): a path specification.

    Returns:
      DataRangeFileEntry: a file entry or None if not available.
    """
    return data_range_file_entry.DataRangeFileEntry(
        self._resolver_context, self, path_spec, is_root=True, is_virtual=True)
예제 #3
0
  def GetFileEntryByPathSpec(self, path_spec):
    """Retrieves a file entry for a path specification.

    Args:
      path_spec: a path specification (instance of PathSpec).

    Returns:
      A file entry (instance of vfs.FileEntry) or None.
    """
    return data_range_file_entry.DataRangeFileEntry(
        self._resolver_context, self, path_spec, is_root=True, is_virtual=True)
예제 #4
0
 def testInitialize(self):
     """Test the __init__ function."""
     file_entry = data_range_file_entry.DataRangeFileEntry(
         self._resolver_context, self._file_system,
         self._data_range_path_spec)
     self.assertIsNotNone(file_entry)