Comments (9)
You need to convert the virtual machine (.vhdx) format to the raw disk format.
from sharpext4.
Can you give an idea on how I can do this?
from sharpext4.
https://docs.openstack.org/image-guide/convert-images.html
As far as I know, the file header format is different.
from sharpext4.
Yep, it doesn't seem to work for me. Actually, I can read the paths of the files with DiscUtils, but I need to export these files. Any idea how it could be?
from sharpext4.
If you can use diskutils, you should be able export those files without any issue. Diskutils only provides read permission only from the disk image, but not write.
SharpExt4 allows you to write a file to the disk image.
from sharpext4.
I am reading with this code. If I make any changes to this code, I can export it.
var disk = new DiscUtils.Vhdx.Disk(secilen.Text, System.IO.FileAccess.Read);
DiscUtils.FileSystems.SetupHelper.SetupFileSystems();
var manager = new VolumeManager(disk);
var logicalVolumes = manager.GetLogicalVolumes();
foreach (var volume in logicalVolumes)
{
var fsInfos = FileSystemManager.DetectFileSystems(volume);
foreach (var fsInfo in fsInfos)
{
var fs = fsInfo.Open(volume);
string[] array2 = fs.GetFiles(fs.Root.Name, "*.*", SearchOption.AllDirectories);
foreach (string name in array2)
{
listbox.Items.Add(name);
}
}
}
from sharpext4.
listbox.Items.Add(name)
//Open file and read the content from the name
...
from sharpext4.
I don't think it's possible with something like this, but I tried it anyway.
string dd = listbox.SelectedItem.ToString();
FileStream fs = File.Open(dd,FileMode.Open);
from sharpext4.
You can't just use File.Open(dd,FileMode.Open). That is the.net native way. You need use diskutils API to open the file. Check diskutils file open API.
from sharpext4.
Related Issues (18)
- Exception when attempting to write text to file: "Could not read disk MBR." HOT 6
- Unhandled Exception while disposing ExtFileStream HOT 7
- Could not mount partition error when read Flash Usb Ext4 HOT 1
- Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. HOT 6
- (It can be simply modified to be compiled in Visual Studio 2013). How? HOT 4
- Error: Could not load file or assembly 'SharpExt4.dll' or one of its dependencies. The specified module could not be found. HOT 5
- Could not load file or assembly 'SharpExt4, Version=1.0.8402.18282 HOT 12
- How to read and write ext4 in vmdk HOT 4
- Unable to recognize EXT4 extended partition HOT 9
- Typo on ExtDisk "Partitions" getter HOT 1
- Open partition from a file system image? HOT 2
- Cannot mount ext4 partition HOT 9
- en/decryption support? HOT 1
- Open multiple image HOT 11
- Could Not Read Disk MBR HOT 1
- GPT partition HOT 8
- ext4 for bootmgr.efi (Windows 7, 8, 10, 11) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sharpext4.