def get_attributes(path):
 err = ''
 if (not os.path.exists(path)):
  err += 'File not found\n'
 if err:
  return err
 attributes = {}
 intAttributes = win32file.GetFileAttributes(path)
 attributes['archive'] = ((intAttributes & 32) == 32)
 attributes['reparsePoint'] = ((intAttributes & 1024) == 1024)
 attributes['compressed'] = ((intAttributes & 2048) == 2048)
 attributes['directory'] = ((intAttributes & 16) == 16)
 attributes['encrypted'] = ((intAttributes & 16384) == 16384)
 attributes['hidden'] = ((intAttributes & 2) == 2)
 attributes['normal'] = ((intAttributes & 128) == 128)
 attributes['notIndexed'] = ((intAttributes & 8192) == 8192)
 attributes['offline'] = ((intAttributes & 4096) == 4096)
 attributes['readonly'] = ((intAttributes & 1) == 1)
 attributes['system'] = ((intAttributes & 4) == 4)
 attributes['temporary'] = ((intAttributes & 256) == 256)
 attributes['mountedVolume'] = False
 if ((attributes['reparsePoint'] is True) and (attributes['directory'] is True)):
  fileIterator = win32file.FindFilesIterator(path)
  findDataTuple = next(fileIterator)
  if (findDataTuple[6] == 2684354563):
   attributes['mountedVolume'] = True
 attributes['symbolicLink'] = False
 if (attributes['reparsePoint'] is True):
  fileIterator = win32file.FindFilesIterator(path)
  findDataTuple = next(fileIterator)
  if (findDataTuple[6] == 2684354572):
   attributes['symbolicLink'] = True
 return attributes

def get_attributes ( path ) : err = '' if ( not os . path . exists ( path ) ) : err += 'File not found\n' if err : return err attributes = { } intAttributes = win32file . GetFileAttributes ( path ) attributes [ 'archive' ] = ( ( intAttributes & 32 ) == 32 ) attributes [ 'reparsePoint' ] = ( ( intAttributes & 1024 ) == 1024 ) attributes [ 'compressed' ] = ( ( intAttributes & 2048 ) == 2048 ) attributes [ 'directory' ] = ( ( intAttributes & 16 ) == 16 ) attributes [ 'encrypted' ] = ( ( intAttributes & 16384 ) == 16384 ) attributes [ 'hidden' ] = ( ( intAttributes & 2 ) == 2 ) attributes [ 'normal' ] = ( ( intAttributes & 128 ) == 128 ) attributes [ 'notIndexed' ] = ( ( intAttributes & 8192 ) == 8192 ) attributes [ 'offline' ] = ( ( intAttributes & 4096 ) == 4096 ) attributes [ 'readonly' ] = ( ( intAttributes & 1 ) == 1 ) attributes [ 'system' ] = ( ( intAttributes & 4 ) == 4 ) attributes [ 'temporary' ] = ( ( intAttributes & 256 ) == 256 ) attributes [ 'mountedVolume' ] = False if ( ( attributes [ 'reparsePoint' ] is True ) and ( attributes [ 'directory' ] is True ) ) : fileIterator = win32file . FindFilesIterator ( path ) findDataTuple = next ( fileIterator ) if ( findDataTuple [ 6 ] == 2684354563 ) : attributes [ 'mountedVolume' ] = True attributes [ 'symbolicLink' ] = False if ( attributes [ 'reparsePoint' ] is True ) : fileIterator = win32file . FindFilesIterator ( path ) findDataTuple = next ( fileIterator ) if ( findDataTuple [ 6 ] == 2684354572 ) : attributes [ 'symbolicLink' ] = True return attributes
check to see if attributes are set on an elb .