Skip to content

footnoise/mazzy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mazzy (File Manager Emulator)

As I remember, this code was written in 2006

What is it?

File Manager Emulator (FME) emulates the details of creating, removing, copying and moving files and directories. It also handles commands related to these file management tasks. FME shall be capable to read and execute a batch file with different kind of commands. After the batch file execution it shall generate and print out formatted directory structure or an error message if something went wrong to standard output. Note that program should do nothing with the real file structure on local hard drives and shall only emulate these activities.

Structure

Namespaceses and basic objects structure

Mazzy

Cmd
Parser
Display
Commands
MakeDir
ChangeDir
RemoveDir
MakeFile
DelTree
Del
Copy
Move
MakeHardLink
MakeDynLink
FS
Path
FileSystem
Object
Dir
File
HLink
DLink

Simple object structure in memory.

For example, if we have path like C:\mazzy\mazzy.cpp Mazzy will store in memory the next data structure:

Dir (Object)
Name C:
Type DIR
Childs [0] » » »
0 « « «  Parent
Dir (Object)
Name mazzy
Type DIR
Childs [0] » » »
« « «  Parent
File (Object)
Name mazzy.cpp
Type FILE
Childs empty
« « «  Parent

Design patterns used

  1. Singleton
  2. Composite
  3. Command
  4. Facade

Using

  1. Compile: just run g++ mazzy.cpp -o mazzy or run make
  2. Run batch files: mazzy < batch.file

About

File Manager Emulator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages