我们正在开发Android应用程序(通过JNI的Android UI和C应用程序)和文件系统EXT4是
We are developing Android application (Android UI and C application through JNI) and File system is ext4.
是否有任何Linux系统调用或Android API来找出分配给文件扇区数。
Is there any Linux system call or Android API to find out sector numbers allocated for a file.
请分享您的想法。
您好:您可以使用stat命令获取文件块和更多信息。
Hello you can get the file blocks and more information using stat command.
统计[OPTIONS] ... FILE ...
stat [OPTIONS]... FILE ...
例如,你可以知道这样的my.cnf的信息:
For example you could know the info about my.cnf like this:
/etc/my.cnf中
stat /etc/my.cnf
您可以使用该选项来获得不同的格式序列单独使用--help选项文件。
You can use the options to get different format sequences for files using the --help option alone.