diff options
author | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-07-01 13:33:19 +0100 |
---|---|---|
committer | Alexandru Scvortov <alexandru@rabbitmq.com> | 2010-07-01 13:33:19 +0100 |
commit | 03fa15425824619c8c7e5a7277f34ecc0df351fe (patch) | |
tree | 49c177b66c79217f2f0a714bcd80234dbec0549d | |
parent | d63ed195cb7a9a7643edd3aeb8014890bbe94575 (diff) | |
download | rabbitmq-server-03fa15425824619c8c7e5a7277f34ecc0df351fe.tar.gz |
updated file-related specs
-rw-r--r-- | include/rabbit.hrl | 1 | ||||
-rw-r--r-- | src/rabbit.erl | 2 | ||||
-rw-r--r-- | src/rabbit_dialyzer.erl | 6 | ||||
-rw-r--r-- | src/rabbit_misc.erl | 16 | ||||
-rw-r--r-- | src/rabbit_mnesia.erl | 3 |
5 files changed, 14 insertions, 14 deletions
diff --git a/include/rabbit.hrl b/include/rabbit.hrl index 8b87dd96..9f981d7f 100644 --- a/include/rabbit.hrl +++ b/include/rabbit.hrl @@ -86,7 +86,6 @@ -type(info_key() :: atom()). -type(info() :: {info_key(), any()}). -type(regexp() :: binary()). --type(file_path() :: string()). %% this is really an abstract type, but dialyzer does not support them -type(guid() :: binary()). diff --git a/src/rabbit.erl b/src/rabbit.erl index 6cf6d7d5..7ae0b160 100644 --- a/src/rabbit.erl +++ b/src/rabbit.erl @@ -183,7 +183,7 @@ -ifdef(use_specs). --type(log_location() :: 'tty' | 'undefined' | string()). +-type(log_location() :: 'tty' | 'undefined' | file:filename()). -type(file_suffix() :: binary()). -spec(prepare/0 :: () -> 'ok'). diff --git a/src/rabbit_dialyzer.erl b/src/rabbit_dialyzer.erl index f19e8d02..5805611f 100644 --- a/src/rabbit_dialyzer.erl +++ b/src/rabbit_dialyzer.erl @@ -38,9 +38,9 @@ -ifdef(use_specs). --spec(create_basic_plt/1 :: (file_path()) -> 'ok'). --spec(add_to_plt/2 :: (file_path(), string()) -> 'ok'). --spec(dialyze_files/2 :: (file_path(), string()) -> 'ok'). +-spec(create_basic_plt/1 :: (file:filename()) -> 'ok'). +-spec(add_to_plt/2 :: (file:filename(), string()) -> 'ok'). +-spec(dialyze_files/2 :: (file:filename(), string()) -> 'ok'). -spec(halt_with_code/1 :: (atom()) -> no_return()). -endif. diff --git a/src/rabbit_misc.erl b/src/rabbit_misc.erl index 146004b1..331a9193 100644 --- a/src/rabbit_misc.erl +++ b/src/rabbit_misc.erl @@ -98,8 +98,8 @@ -spec(enable_cover/0 :: () -> ok_or_error()). -spec(start_cover/1 :: ([{string(), string()} | string()]) -> 'ok'). -spec(report_cover/0 :: () -> 'ok'). --spec(enable_cover/1 :: (file_path()) -> ok_or_error()). --spec(report_cover/1 :: (file_path()) -> 'ok'). +-spec(enable_cover/1 :: (file:filename()) -> ok_or_error()). +-spec(report_cover/1 :: (file:filename()) -> 'ok'). -spec(throw_on_error/2 :: (atom(), thunk({error, any()} | {ok, A} | A)) -> A). -spec(with_exit_handler/2 :: (thunk(A), thunk(A)) -> A). @@ -120,10 +120,10 @@ -spec(dirty_read_all/1 :: (atom()) -> [any()]). -spec(dirty_foreach_key/2 :: (fun ((any()) -> any()), atom()) -> 'ok' | 'aborted'). --spec(dirty_dump_log/1 :: (file_path()) -> ok_or_error()). --spec(read_term_file/1 :: (file_path()) -> {'ok', [any()]} | {'error', any()}). --spec(write_term_file/2 :: (file_path(), [any()]) -> ok_or_error()). --spec(append_file/2 :: (file_path(), string()) -> ok_or_error()). +-spec(dirty_dump_log/1 :: (file:filename()) -> ok_or_error()). +-spec(read_term_file/1 :: (file:filename()) -> {'ok', [any()]} | {'error', any()}). +-spec(write_term_file/2 :: (file:filename(), [any()]) -> ok_or_error()). +-spec(append_file/2 :: (file:filename(), string()) -> ok_or_error()). -spec(ensure_parent_dirs_exist/1 :: (string()) -> 'ok'). -spec(format_stderr/2 :: (string(), [any()]) -> 'ok'). -spec(start_applications/1 :: ([atom()]) -> 'ok'). @@ -137,8 +137,8 @@ -spec(version_compare/2 :: (string(), string()) -> 'lt' | 'eq' | 'gt'). -spec(version_compare/3 :: (string(), string(), ('lt' | 'lte' | 'eq' | 'gte' | 'gt')) -> boolean()). --spec(recursive_delete/1 :: ([file_path()]) -> - 'ok' | {'error', {file_path(), any()}}). +-spec(recursive_delete/1 :: ([file:filename()]) -> + 'ok' | {'error', {file:filename(), any()}}). -spec(dict_cons/3 :: (any(), any(), dict()) -> dict()). -spec(unlink_and_capture_exit/1 :: (pid()) -> 'ok'). diff --git a/src/rabbit_mnesia.erl b/src/rabbit_mnesia.erl index d4b29943..ba3019be 100644 --- a/src/rabbit_mnesia.erl +++ b/src/rabbit_mnesia.erl @@ -1,3 +1,4 @@ + %% The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License at @@ -49,7 +50,7 @@ -spec(status/0 :: () -> [{'nodes', [{node_type(), [erlang_node()]}]} | {'running_nodes', [erlang_node()]}]). --spec(dir/0 :: () -> file_path()). +-spec(dir/0 :: () -> file:filename()). -spec(ensure_mnesia_dir/0 :: () -> 'ok'). -spec(init/0 :: () -> 'ok'). -spec(is_db_empty/0 :: () -> boolean()). |