diff options
-rw-r--r-- | lib/kernel/src/file.erl | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl index 80780700ab..7a48d34a09 100644 --- a/lib/kernel/src/file.erl +++ b/lib/kernel/src/file.erl @@ -1351,64 +1351,6 @@ fname_join(Dir, Name) -> %%%----------------------------------------------------------------- %%% Utility functions. -%% convert file times. -%% all times from prime_file (and file_server) are in unix epochs - -%% from_epochs -%file_info_time(epoch, {ok, FI} = R) -> R; -%file_info_time(local, {ok, #file_info{ atime = Atime, ctime = Ctime, mtime = Mtime } = FI}) -> -% {ok, FI#file_info{ -% atime = time_epochs_to_local(Atime), -% ctime = time_epochs_to_local(Ctime), -% mtime = time_epochs_to_local(Mtime) -% } -% }; -%file_info_time(utc, {ok, #file_info{ atime = Atime, ctime = Ctime, mtime = Mtime } = FI}) -> -% {ok, FI#file_info{ -% atime = time_epochs_to_utc(Atime), -% ctime = time_epochs_to_utc(Ctime), -% mtime = time_epochs_to_utc(Mtime) -% } -% }; -%file_info_time(_, Error) -> Error. -% -%%% from_epochs -%file_info_epochs(epoch, FI) -> FI; -%file_info_epochs(local, #file_info{ atime = Atime, ctime = Ctime, mtime = Mtime } = FI) -> -% FI#file_info{ -% atime = time_local_to_epochs(Atime), -% ctime = time_local_to_epochs(Ctime), -% mtime = time_local_to_epochs(Mtime) -% }; -%file_info_epochs(utc, {ok, #file_info{ atime = Atime, ctime = Ctime, mtime = Mtime } = FI}) -> -% FI#file_info{ -% atime = time_utc_to_epochs(Atime), -% ctime = time_utc_to_epochs(Ctime), -% mtime = time_utc_to_epochs(Mtime) -% }. -% -% -%-define(DAYS_FROM_0_TO_1970, 719528). -%-define(SECONDS_PER_DAY, 86400). -% -%time_epochs_to_utc(Seconds) when is_integer(Seconds) -> -% calendar:gregorian_seconds_to_datetime(Seconds + ?SECONDS_PER_DAY * ?DAYS_FROM_0_TO_1970). -% -%time_epochs_to_local(Seconds) when is_integer(Seconds) -> -% erlang:universaltime_to_localtime(calendar:gregorian_seconds_to_datetime(Seconds + ?SECONDS_PER_DAY * ?DAYS_FROM_0_TO_1970)). -% -%time_utc_to_epochs({_, _} = Datetime) -> -% calendar:datetime_to_gregorian_seconds(Datetime) - ?SECONDS_PER_DAY * ?DAYS_FROM_0_TO_1970; -%time_utc_to_epochs(undefined) -> -% time_utc_to_epochs(erlang:universaltime()). -% -% -%time_local_to_epochs({_, _} = Datetime) -> -% calendar:datetime_to_gregorian_seconds(erlang:localtime_to_universaltime(Datetime)) - ?SECONDS_PER_DAY * ?DAYS_FROM_0_TO_1970; -%time_local_to_epochs(undefined) -> -% time_utc_to_epochs(erlang:universaltime()). -% - %% file_name(FileName) %% Generates a flat file name from a deep list of atoms and %% characters (integers). |