first commit
This commit is contained in:
121
.gitignore
vendored
Normal file
121
.gitignore
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
# ---> Custom
|
||||
# macOS system files
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Windows system files
|
||||
Thumbs.db
|
||||
|
||||
# Unix/Linux system files
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# Logs and temporary files
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
.bower_components/
|
||||
|
||||
# Build directories
|
||||
dist/
|
||||
build/
|
||||
coverage/
|
||||
out/
|
||||
|
||||
# Environment and secrets
|
||||
.env
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Generated files
|
||||
*.lock
|
||||
*.tmp
|
||||
*.cache
|
||||
*.pid
|
||||
|
||||
# Compiled files
|
||||
*.class
|
||||
*.o
|
||||
*.so
|
||||
*.exe
|
||||
|
||||
# Crash reports
|
||||
*.stackdump
|
||||
*.dmp
|
||||
*.mdmp
|
||||
|
||||
# External version control systems
|
||||
.svn/
|
||||
.hg/
|
||||
.git/
|
||||
.cvsignore
|
||||
|
||||
# Backup and leftover files
|
||||
*.bak
|
||||
*.old
|
||||
*.orig
|
||||
|
||||
# Extended macOS system files
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
._*
|
||||
|
||||
# Node.js
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
.pnpm-debug.log
|
||||
|
||||
# JetBrains IDEs (IntelliJ IDEA, PhpStorm, WebStorm, etc.)
|
||||
.idea/
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
# Editor temporary files
|
||||
.vscode/
|
||||
*.code-workspace
|
||||
*.sublime-workspace
|
||||
|
||||
# Archives
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# Framework-specific files (Symfony, React, Angular, etc.)
|
||||
var/
|
||||
vendor/
|
||||
public/uploads/
|
||||
storage/
|
||||
|
||||
# Testing and linting tools
|
||||
eslintcache/
|
||||
.jest/
|
||||
.jest-cache/
|
||||
.jest-output/
|
||||
|
||||
# Docker
|
||||
docker-compose.override.yml
|
||||
.env.docker.local
|
||||
|
||||
# Miscellaneous
|
||||
*.log.*
|
||||
*.log~
|
||||
|
||||
# Python
|
||||
#All python cache files and folders
|
||||
*.py[cod]
|
||||
*.pyo
|
||||
*.pyd
|
||||
*.pdb
|
||||
*.egg-info/
|
||||
*.egg
|
||||
*.whl
|
||||
$__pycache__/
|
||||
*.pyc
|
||||
|
||||
37
README.md
Normal file
37
README.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# EXO-JAVA-Manipulation de fichiers
|
||||
|
||||
## Objectif
|
||||
|
||||
Créer une application de gestion de fichiers qui permet d’explorer et de maîtriser les différentes fonctionnalités de manipulation de fichiers en Java.
|
||||
|
||||
## Énoncé
|
||||
|
||||
### Partie 1 : Opérations de base sur les fichiers
|
||||
|
||||
1. Créer une classe `FileManager` avec les méthodes suivantes :
|
||||
- `createFile(String path)` : Crée un nouveau fichier
|
||||
- `deleteFile(String path)` : Supprime un fichier existant
|
||||
- `copyFile(String source, String destination)` : Copie un fichier vers une nouvelle destination
|
||||
- `moveFile(String source, String destination)` : Déplace un fichier vers une nouvelle destination
|
||||
- `listFiles(String directory)` : Liste tous les fichiers d’un répertoire
|
||||
- `getFileInfo(String path)` : Récupère les informations d’un fichier (taille, date de création, etc.)
|
||||
2. Implémenter des méthodes de gestion des répertoires :
|
||||
- `createDirectory(String path)` : Crée un nouveau répertoire
|
||||
- `deleteDirectory(String path)` : Supprime un répertoire et son contenu
|
||||
- `listDirectories(String path)` : Liste tous les sous-répertoires
|
||||
- `getDirectorySize(String path)` : Calcule la taille totale d’un répertoire
|
||||
|
||||
### Partie 2 : Lecture et écriture de fichiers
|
||||
|
||||
1. Créer une classe `FileIO` avec les méthodes :
|
||||
- `readTextFile(String path)` : Lit le contenu d’un fichier texte
|
||||
- `writeTextFile(String path, String content)` : Écrit du contenu dans un fichier texte
|
||||
- `appendToFile(String path, String content)` : Ajoute du contenu à la fin d’un fichier
|
||||
- `readBinaryFile(String path)` : Lit le contenu d’un fichier binaire
|
||||
- `writeBinaryFile(String path, byte[] data)` : Écrit des données binaires dans un fichier
|
||||
2. Implémenter des méthodes de traitement avancé :
|
||||
- `readFileByLines(String path)` : Lit un fichier ligne par ligne
|
||||
- `writeFileByLines(String path, List<String> lines)` : Écrit un fichier ligne par ligne
|
||||
- `readFileByChunks(String path, int chunkSize)` : Lit un fichier par morceaux
|
||||
- `compressFile(String source, String destination)` : Compresse un fichier
|
||||
- `decompressFile(String source, String destination)` : Décompresse un fichier
|
||||
Reference in New Issue
Block a user