golang read directly from blocks

-2

I have a file of roughly 300MB. and I run the following command on Linux:

sudo debugfs -R "stat /home/user1/Documents/test.csv" /dev/sda2

I get the following output:

Inode: 16913580   Type: regular    Mode:  0644   Flags: 0x80000
Generation: 3920968942    Version: 0x00000000:00000001
User:  1000   Group:  1000   Project:     0   Size: 301526706
File ACL: 0
Links: 1   Blockcount: 588928
Fragment:  Address: 0    Number: 0    Size: 0
 ctime: 0x5df9e6c2:7636fdcc -- Wed Dec 18 14:13:46 2019
 atime: 0x5e67b696:d6bfb018 -- Tue Mar 10 21:17:34 2020
 mtime: 0x5df11990:00000000 -- Wed Dec 11 22:00:08 2019
crtime: 0x5df9e6c0:63257940 -- Wed Dec 18 14:13:44 2019
Size of extra inode fields: 32
Inode checksum: 0x35f4d147
EXTENTS:
(ETB0):67695655, (0-8191):162652160-162660351, (8192-40959):165953536-165986303, (40960-57343):165986304-166002687, (57344-61439):166129664-166133759, (61440-65535):166135808-166139903, (65536-67583):166164480-166166527, (67584-71679):166168576-166172671, (71680-73614):166207623-166209557

I think the EXTENTS: shows the physical blocks of the file.

My question is, is it possible to directly read from these block numbers in golang as byte array?

linux
file
go
operating-system
filesystems
asked on Stack Overflow Mar 10, 2020 by spiralarchitect

1 Answer

-1

My question is, is it possible to directly read from these block numbers in golang as byte array?

No.

answered on Stack Overflow Mar 10, 2020 by Volker

User contributions licensed under CC BY-SA 3.0