couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fdman...@apache.org
Subject svn commit: r963038 - in /couchdb/trunk/src/couchdb: couch_log.erl couch_util.erl
Date Sun, 11 Jul 2010 10:11:56 GMT
Author: fdmanana
Date: Sun Jul 11 10:11:55 2010
New Revision: 963038

URL: http://svn.apache.org/viewvc?rev=963038&view=rev
Log:
Removing couch_util:read_file_size/1 because same functionality is provided by filelib:file_size/1.


Modified:
    couchdb/trunk/src/couchdb/couch_log.erl
    couchdb/trunk/src/couchdb/couch_util.erl

Modified: couchdb/trunk/src/couchdb/couch_log.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_log.erl?rev=963038&r1=963037&r2=963038&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_log.erl (original)
+++ couchdb/trunk/src/couchdb/couch_log.erl Sun Jul 11 10:11:55 2010
@@ -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,

Modified: couchdb/trunk/src/couchdb/couch_util.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_util.erl?rev=963038&r1=963037&r2=963038&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_util.erl (original)
+++ couchdb/trunk/src/couchdb/couch_util.erl Sun Jul 11 10:11:55 2010
@@ -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) ->



Mime
View raw message