Module epax_os

handles os specific operations.

Copyright © (C) 2012 Erlware, LLC.

Authors: Aman Mangal (mangalaman93@gmail.com).

Description

handles os specific operations

Function Index

copy_folder/2copies one folder to another, creates the intermediate directories if required.
get_abs_path/1returns absolute path to the given location which is relative to ~/.epax folder.
mkdir/1create the directory if it does not exist already.
mv_folder/2moves content of one folder to another (renames the folder).
rmdir/1deletes the given directory.
run_in_dir/2runs a command in a directory.
touch/1creates an empty file.

Function Details

copy_folder/2

copy_folder(From, To) -> ok

copies one folder to another, creates the intermediate directories if required

get_abs_path/1

get_abs_path(Location) -> Result | no_return()

returns absolute path to the given location which is relative to ~/.epax folder

mkdir/1

mkdir(Path) -> ok | {error, Reason}

create the directory if it does not exist already. Also makes parent directories as needed.

mv_folder/2

mv_folder(From, To) -> ok

moves content of one folder to another (renames the folder)

rmdir/1

rmdir(Path) -> ok

deletes the given directory

run_in_dir/2

run_in_dir(Path, Cmd) -> Result

runs a command in a directory. This command should only be used to run external application like git.

touch/1

touch(Path) -> ok

creates an empty file


Generated by EDoc