Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class FileSystem {
- public function store($file)
- {
- $this->checkFreeSpace();
- $this->storeFile($file);
- }
- private function checkFreeSpace()
- {
- if (free_disk_space() == 0) {
- throw new Exception("Not enought free space.");
- }
- }
- private function storeFile($file)
- {
- // Real code for store file
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement