Skip to content

awneesht/C-11

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Write a program that simulates a "cd" Unix command in an abstract file system. The command takes two path strings from the command line and prints a new path or an error. The first path is a current directory. The second path is a new directory. Examples:

% mycd /abc/def ghi /abc/def/ghi % mycd /abc/def .. /abc % mycd /abc/def /abc /abc % mycd /abc/def /abc/klm /abc/klm % mycd /abc/def ../.. / % mycd /abc/def ../../.. / % mycd /abc/def . /abc/def % mycd /abc/def ..klm ..klm: No such file or directory

Tests

Compile using g++ as below g++ -std=c++11 changeDirectory.cpp

Run a.exe Ouput:

Current Directory: Target Directiory: After Operations:

About

Custom change directory implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages