How to use dir_property method in autotest

Best Python code snippet using autotest_python

const.py

Source:const.py Github

copy

Full Screen

1#!/usr/bin/env python2# vim: set et sw=4 sts=4 fileencoding=utf-8:3#4# A library for reading Microsoft's OLE Compound Document format5# Copyright (c) 2014 Dave Hughes <dave@waveform.org.uk>6#7# Permission is hereby granted, free of charge, to any person obtaining a copy8# of this software and associated documentation files (the "Software"), to deal9# in the Software without restriction, including without limitation the rights10# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell11# copies of the Software, and to permit persons to whom the Software is12# furnished to do so, subject to the following conditions:13#14# The above copyright notice and this permission notice shall be included in15# all copies or substantial portions of the Software.16#17# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR18# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,19# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE20# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER21# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,22# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE23# SOFTWARE.24from __future__ import (25 unicode_literals,26 absolute_import,27 print_function,28 division,29 )30native_str = str31str = type('')32import struct as st33# Magic identifier at the start of the file34COMPOUND_MAGIC = b'\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1'35FREE_SECTOR = 0xFFFFFFFF # denotes an unallocated (free) sector36END_OF_CHAIN = 0xFFFFFFFE # denotes the end of a stream chain37NORMAL_FAT_SECTOR = 0xFFFFFFFD # denotes a sector used for the regular FAT38MASTER_FAT_SECTOR = 0xFFFFFFFC # denotes a sector used for the master FAT39MAX_NORMAL_SECTOR = 0xFFFFFFFA # the maximum sector in a file40MAX_REG_SID = 0xFFFFFFFA # maximum directory entry ID41NO_STREAM = 0xFFFFFFFF # unallocated directory entry42DIR_INVALID = 0 # unknown/empty(?) storage type43DIR_STORAGE = 1 # element is a storage (dir) object44DIR_STREAM = 2 # element is a stream (file) object45DIR_LOCKBYTES = 3 # element is an ILockBytes object46DIR_PROPERTY = 4 # element is an IPropertyStorage object47DIR_ROOT = 5 # element is the root storage object48FILENAME_ENCODING = 'latin-1'49COMPOUND_HEADER = st.Struct(native_str(''.join((50 native_str('<'), # little-endian format51 native_str('8s'), # magic string52 native_str('16s'), # file UUID (unused)53 native_str('H'), # file header major version54 native_str('H'), # file header minor version55 native_str('H'), # byte order mark56 native_str('H'), # sector size (actual size is 2**sector_size)57 native_str('H'), # mini sector size (actual size is 2**short_sector_size)58 native_str('6s'), # unused59 native_str('L'), # directory chain sector count60 native_str('L'), # normal-FAT sector count61 native_str('L'), # ID of first sector of the normal-FAT62 native_str('L'), # transaction signature (unused)63 native_str('L'), # minimum size of a normal stream64 native_str('L'), # ID of first sector of the mini-FAT65 native_str('L'), # mini-FAT sector count66 native_str('L'), # ID of first sector of the master-FAT67 native_str('L'), # master-FAT sector count68 ))))69DIR_HEADER = st.Struct(native_str(''.join((70 native_str('<'), # little-endian format71 native_str('64s'), # NULL-terminated filename in UTF-16 little-endian encoding72 native_str('H'), # length of filename in bytes (why?!)73 native_str('B'), # dir-entry type74 native_str('B'), # red (0) or black (1) entry75 native_str('L'), # ID of left-sibling node76 native_str('L'), # ID of right-sibling node77 native_str('L'), # ID of children's root node78 native_str('16s'), # dir-entry UUID (unused)79 native_str('L'), # user flags (unused)80 native_str('Q'), # creation timestamp81 native_str('Q'), # modification timestamp82 native_str('L'), # start sector of stream83 native_str('L'), # low 32-bits of stream size84 native_str('L'), # high 32-bits of stream size...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run autotest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful