Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- // Use IntelliSense to learn about possible attributes.
- // Hover to view descriptions of existing attributes.
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
- "version": "0.2.0",
- "configurations": [
- {
- "name": "(gdb) Launch",
- "type": "cppdbg",
- "request": "launch",
- "program": "${workspaceFolder}/ufs",
- "args": [],
- "stopAtEntry": false,
- "cwd": "${workspaceFolder}",
- "environment": [],
- "externalConsole": false,
- "MIMode": "gdb",
- "setupCommands": [
- {
- "description": "Enable pretty-printing for gdb",
- "text": "-enable-pretty-printing",
- "ignoreFailures": true
- }
- ],
- "logging": { "trace": true, "traceResponse": true }
- },
- {
- "name": "g++ build and debug active file",
- "type": "cppdbg",
- "request": "launch",
- "program": "${fileDirname}/ufs",
- "args": [],
- "stopAtEntry": false,
- "cwd": "${workspaceFolder}",
- "environment": [],
- "externalConsole": false,
- "MIMode": "gdb",
- "setupCommands": [
- {
- "description": "Enable pretty-printing for gdb",
- "text": "-enable-pretty-printing",
- "ignoreFailures": true
- }
- ],
- "preLaunchTask": "g++ build active file",
- "miDebuggerPath": "/usr/bin/gdb"
- }
- ]
- }
- /******************************************/
- #include <iostream>
- #include <string>
- #include <vector>
- #include <sstream>
- #include <fstream>
- #include "disqueVirtuel.h"
- using namespace std;
- using namespace TP3;
- DisqueVirtuel mon_disque;
- //Pour debug : g++ -g -o ufs block.cpp disqueVirtuel.cpp main.cpp
- int main (int argc, char **argv)
- {
- (mon_disque).bd_FormatDisk();
- cout << (mon_disque).bd_ls("/");
- (mon_disque).bd_mkdir("/doc");
- (mon_disque).bd_mkdir("/tmp");
- (mon_disque).bd_mkdir("/tmp/lib");
- (mon_disque).bd_mkdir("/tmp/lib/deep");
- cout << (mon_disque).bd_ls("/tmp/lib/deep");
- (mon_disque).bd_rm("/tmp/lib/deep");
- (mon_disque).bd_rm("/tmp/lib");
- (mon_disque).bd_rm("/tmp");
- //(mon_disque).bd_create("/doc/alex.txt");
- // (mon_disque).bd_create("/a.txt");
- cout << (mon_disque).bd_ls("/");
- //(mon_disque).bd_rm("/a.txt");
- // cout << (mon_disque).bd_ls("/");
- // (mon_disque).bd_rm("/doc");
- // cout << (mon_disque).bd_ls("/doc");
- //(mon_disque).bd_rm("/doc/alex.txt");
- // cout << (mon_disque).bd_ls("/doc");
- //cout << (mon_disque).bd_ls("/");
- //(mon_disque).bd_rm("/doc");
- // cout << (mon_disque).bd_ls("/");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement