Advertisement
Guest User

Untitled

a guest
Dec 15th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. {
  2. // Use IntelliSense to learn about possible attributes.
  3. // Hover to view descriptions of existing attributes.
  4. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
  5. "version": "0.2.0",
  6. "configurations": [
  7. {
  8. "name": "(gdb) Launch",
  9. "type": "cppdbg",
  10. "request": "launch",
  11. "program": "${workspaceFolder}/ufs",
  12. "args": [],
  13. "stopAtEntry": false,
  14. "cwd": "${workspaceFolder}",
  15. "environment": [],
  16. "externalConsole": false,
  17. "MIMode": "gdb",
  18. "setupCommands": [
  19. {
  20. "description": "Enable pretty-printing for gdb",
  21. "text": "-enable-pretty-printing",
  22. "ignoreFailures": true
  23. }
  24. ],
  25. "logging": { "trace": true, "traceResponse": true }
  26. },
  27.  
  28. {
  29. "name": "g++ build and debug active file",
  30. "type": "cppdbg",
  31. "request": "launch",
  32. "program": "${fileDirname}/ufs",
  33. "args": [],
  34. "stopAtEntry": false,
  35. "cwd": "${workspaceFolder}",
  36. "environment": [],
  37. "externalConsole": false,
  38. "MIMode": "gdb",
  39. "setupCommands": [
  40. {
  41. "description": "Enable pretty-printing for gdb",
  42. "text": "-enable-pretty-printing",
  43. "ignoreFailures": true
  44. }
  45. ],
  46. "preLaunchTask": "g++ build active file",
  47. "miDebuggerPath": "/usr/bin/gdb"
  48. }
  49. ]
  50. }
  51. /******************************************/
  52.  
  53. #include <iostream>
  54. #include <string>
  55. #include <vector>
  56. #include <sstream>
  57. #include <fstream>
  58. #include "disqueVirtuel.h"
  59.  
  60.  
  61. using namespace std;
  62. using namespace TP3;
  63.  
  64. DisqueVirtuel mon_disque;
  65.  
  66. //Pour debug : g++ -g -o ufs block.cpp disqueVirtuel.cpp main.cpp
  67.  
  68. int main (int argc, char **argv)
  69. {
  70. (mon_disque).bd_FormatDisk();
  71. cout << (mon_disque).bd_ls("/");
  72. (mon_disque).bd_mkdir("/doc");
  73. (mon_disque).bd_mkdir("/tmp");
  74. (mon_disque).bd_mkdir("/tmp/lib");
  75. (mon_disque).bd_mkdir("/tmp/lib/deep");
  76. cout << (mon_disque).bd_ls("/tmp/lib/deep");
  77. (mon_disque).bd_rm("/tmp/lib/deep");
  78. (mon_disque).bd_rm("/tmp/lib");
  79. (mon_disque).bd_rm("/tmp");
  80. //(mon_disque).bd_create("/doc/alex.txt");
  81. // (mon_disque).bd_create("/a.txt");
  82. cout << (mon_disque).bd_ls("/");
  83. //(mon_disque).bd_rm("/a.txt");
  84. // cout << (mon_disque).bd_ls("/");
  85. // (mon_disque).bd_rm("/doc");
  86. // cout << (mon_disque).bd_ls("/doc");
  87. //(mon_disque).bd_rm("/doc/alex.txt");
  88. // cout << (mon_disque).bd_ls("/doc");
  89. //cout << (mon_disque).bd_ls("/");
  90. //(mon_disque).bd_rm("/doc");
  91. // cout << (mon_disque).bd_ls("/");
  92. return 0;
  93. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement