aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/small_tests_SUITE_data/src/flatten.erl
blob: ac28fe27c9d2bc02e5c1fdf92798c73817e632ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
%%%-------------------------------------------------------------------
%%% File    : flatten.erl
%%% Author  : Tobias Lindahl <[email protected]>
%%% Description : 
%%%
%%% Created :  4 Nov 2007 by Tobias Lindahl <[email protected]>
%%%-------------------------------------------------------------------
-module(flatten).

-export([t/1]).

t(Dir) ->
  case file:list_dir(Dir) of
    {ok,FileList} ->
      FileList;
    {error,Reason} ->
      {error,lists:flatten("Can't open directory "++Dir++": "++Reason)}
  end.