Open
Description
- Description
I've encountered a troublesome issue during the relevant operations. Currently, I'm attempting to parse an ISO file and read a file within it that is larger than 4GB. However, during this reading process, I can only obtain data with a size of around 4GB minus 2KB, and I'm unable to retrieve the entire content of this large file, which has consequently hindered the normal progress of the subsequent processing workflow.
Steps to Reproduce
- Preparation:
disk, err := diskfs.OpenWithMode("1.iso", diskfs.ReadOnly)
if err != nil {
}
//
fs, err := disk.GetFilesystem(0)
if err != nil {
}
file, err := fs.OpenFile(filePath, os.O_RDONLY)
// 获取当前位置
originalPos, err := file.Seek(0, io.SeekCurrent)
if err != nil {
fmt.Printf("获取当前位置出错: %v\n", err)
}
// 移动到文件末尾获取大小
endPos, err := file.Seek(0, io.SeekEnd)
if err != nil {
fmt.Printf("获取文件大小出错: %v\n", err)
}
fileSize := endPos - originalPos
fmt.Printf("文件大小为: %d字节\n", fileSize)
- example : Only <4G can be analyzed
however,the exacted file size
root@charger-PC:/data/home/charger/Downloads# ls -al |grep filesystem.squashfs
-rw-r--r-- 1 charger charger 4580610048 10月 23 13:45 filesystem.squashfs
Metadata
Metadata
Assignees
Labels
No labels