summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilipe David Borba Manana <fdmanana@apache.org>2010-07-11 10:11:55 +0000
committerFilipe David Borba Manana <fdmanana@apache.org>2010-07-11 10:11:55 +0000
commitd4446bfb78a2f5f9049e5aa52f2927769e239286 (patch)
tree61c950cd80ea1add9c015531880f52cfcd368f6d
parent828d8eba2628fed701cbb59e0edd6da8fb482293 (diff)
Removing couch_util:read_file_size/1 because same functionality is provided by filelib:file_size/1.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@963038 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/couchdb/couch_log.erl2
-rw-r--r--src/couchdb/couch_util.erl10
2 files changed, 2 insertions, 10 deletions
diff --git a/src/couchdb/couch_log.erl b/src/couchdb/couch_log.erl
index 2d62cbb5..d21f7ecc 100644
--- a/src/couchdb/couch_log.erl
+++ b/src/couchdb/couch_log.erl
@@ -139,7 +139,7 @@ log(Fd, Pid, Level, Format, Args) ->
read(Bytes, Offset) ->
LogFileName = couch_config:get("log", "file"),
- LogFileSize = couch_util:file_read_size(LogFileName),
+ LogFileSize = filelib:file_size(LogFileName),
{ok, Fd} = file:open(LogFileName, [read]),
Start = lists:max([LogFileSize - Bytes, 0]) + Offset,
diff --git a/src/couchdb/couch_util.erl b/src/couchdb/couch_util.erl
index e50ab2fe..ff4cbe36 100644
--- a/src/couchdb/couch_util.erl
+++ b/src/couchdb/couch_util.erl
@@ -18,7 +18,7 @@
-export([abs_pathname/1,abs_pathname/2, trim/1, ascii_lower/1]).
-export([encodeBase64Url/1, decodeBase64Url/1]).
-export([to_hex/1, parse_term/1, dict_find/3]).
--export([file_read_size/1, get_nested_json_value/2, json_user_ctx/1]).
+-export([get_nested_json_value/2, json_user_ctx/1]).
-export([proplist_apply_field/2, json_apply_field/2]).
-export([to_binary/1, to_integer/1, to_list/1, url_encode/1]).
-export([json_encode/1, json_decode/1]).
@@ -314,14 +314,6 @@ dict_find(Key, Dict, DefaultValue) ->
DefaultValue
end.
-
-file_read_size(FileName) ->
- case file:read_file_info(FileName) of
- {ok, FileInfo} ->
- FileInfo#file_info.size;
- Error -> Error
- end.
-
to_binary(V) when is_binary(V) ->
V;
to_binary(V) when is_list(V) ->