Skip to contents

Retrieve information from entry (file and directory) headers on virtual ADF devices. Get information like entry name, modification date, file size etc.

Usage

adf_entry_info(x, virtual_path, ...)

# S3 method for class 'adf_device'
adf_entry_info(x, virtual_path, ...)

# S3 method for class 'virtual_path'
adf_entry_info.adf_device(x, virtual_path, ...)

# S3 method for class 'character'
adf_entry_info.adf_device(x, virtual_path, ...)

# S3 method for class 'virtual_path'
adf_entry_info(x, virtual_path, ...)

# S3 method for class 'adf_file_con'
adf_entry_info(x, virtual_path, ...)

Arguments

x

Either a virtual device or virtual path.

virtual_path

A virtual_path() to be checked for existence. Should be omitted when x is already a virtual path.

...

Ignored

Value

Returns a named list of entry properties. Elements included in the list depend on the type of entry (root, directory or file).

Author

Pepijn de Vries

Examples

## First setup a connection to a virtual device
adz_file <- system.file("example.adz", package = "adfExplorer2")
my_device <- connect_adf(adz_file)

adf_entry_info(my_device, "DF0:")
#> $type
#> [1] "HEADER"
#> 
#> $headerKey
#> [1] 0
#> 
#> $highSeq
#> [1] 0
#> 
#> $firstData
#> [1] 0
#> 
#> $checkSum
#> [1] -161088455
#> 
#> $hashTable
#>  [1]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [20]   0   0   0 883   0 882   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [39]   0   0   0   0   0   0   0   0   0   0 885   0   0 884   0   0   0   0   0
#> [58]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> 
#> $bitmapFlag
#> [1] TRUE
#> 
#> $bmPages
#>  [1] 881   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [20]   0   0   0   0   0   0
#> 
#> $bmExt
#> [1] 0
#> 
#> $creation
#> [1] "2017-10-17 10:37:36 UTC"
#> 
#> $diskName
#> [1] "adfExampleOFS"
#> 
#> $access
#> [1] "2017-10-17 11:33:35 UTC"
#> 
#> $creation_o
#> [1] "2017-10-17 07:32:40 UTC"
#> 
#> $nextSameHash
#> [1] 0
#> 
#> $parent
#> [1] 0
#> 
#> $extension
#> [1] 0
#> 
#> $secType
#> [1] "ROOT"
#> 
adf_entry_info(my_device, "s")
#> $type
#> [1] "HEADER"
#> 
#> $sector
#> [1] 882
#> 
#> $highSeq
#> [1] 0
#> 
#> $checkSum
#> [1] -22236329
#> 
#> $hashTable
#>  [1]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [20]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [39]   0   0   0   0   0   0   0   0   0   0   0 915   0   0   0   0   0   0   0
#> [58]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> 
#> $access
#>     D     E     W     R     A     P     S     H 
#> FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 
#> 
#> $comment
#> [1] ""
#> 
#> $modified
#> [1] "2017-10-17 11:33:34 UTC"
#> 
#> $dirname
#> [1] "S"
#> 
#> $real
#> [1] 0
#> 
#> $nextLink
#> [1] 0
#> 
#> $nextSameHash
#> [1] 0
#> 
#> $parent
#> [1] 880
#> 
#> $extension
#> [1] 0
#> 
#> $secType
#> [1] "DIR"
#> 
adf_entry_info(my_device, "s/startup-sequence")
#> $type
#> [1] "HEADER"
#> 
#> $headerKey
#> [1] 915
#> 
#> $highSeq
#> [1] 2
#> 
#> $dataSize
#> [1] 0
#> 
#> $firstData
#> [1] 916
#> 
#> $checkSum
#> [1] 1967975386
#> 
#> $dataBlocks
#>  [1]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [20]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [39]   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
#> [58]   0   0   0   0   0   0   0   0   0   0   0   0   0 917 916
#> 
#> $access
#>     D     E     W     R     A     P     S     H 
#> FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE 
#> 
#> $byteSize
#> [1] 664
#> 
#> $comment
#> [1] ""
#> 
#> $modified
#> [1] "2017-10-17 11:33:34 UTC"
#> 
#> $filename
#> [1] "Startup-Sequence"
#> 
#> $real
#> [1] 0
#> 
#> $nextLink
#> [1] 0
#> 
#> $nextSameHash
#> [1] 0
#> 
#> $parent
#> [1] 882
#> 
#> $extension
#> [1] 0
#> 
#> $secType
#> [1] "FILE"
#> 

close(my_device)