1
0
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:
2024-06-25 11:23:25 +02:00
parent 5710f193d7
commit 1ddd5534c8
3 changed files with 35 additions and 13 deletions

21
src/builtins/ret_cwd.c Normal file
View 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));
}