mirror of
https://github.com/KeyZox71/ft_minipowershell.git
synced 2025-05-14 08:18:45 +02:00
「✨」 feat: CD working
This commit is contained in:
21
src/builtins/ret_cwd.c
Normal file
21
src/builtins/ret_cwd.c
Normal file
@ -0,0 +1,21 @@
|
||||
/* ************************************************************************** */
|
||||
/* */
|
||||
/* ::: :::::::: */
|
||||
/* ret_cwd.c :+: :+: :+: */
|
||||
/* +:+ +:+ +:+ */
|
||||
/* By: adjoly <adjoly@student.42angouleme.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/06/25 10:41:43 by adjoly #+# #+# */
|
||||
/* Updated: 2024/06/25 10:44:01 by adjoly ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "builtins.h"
|
||||
#include <unistd.h>
|
||||
|
||||
char *ret_cwd(void)
|
||||
{
|
||||
char buf[PATH_MAX_LEN];
|
||||
|
||||
return (getcwd(buf, PATH_MAX_LEN));
|
||||
}
|
Reference in New Issue
Block a user