How to resolve the algorithm File modification time step by step in the Erlang programming language
Published on 12 May 2024 09:40 PM
How to resolve the algorithm File modification time step by step in the Erlang programming language
Table of Contents
Problem Statement
Get and set the modification time of a file.
Let's start with the solution:
Step by Step solution about How to resolve the algorithm File modification time step by step in the Erlang programming language
Source code in the erlang programming language
-module( file_modification_time ).
-include_lib("kernel/include/file.hrl").
-export( [task/0] ).
task() ->
File = "input.txt",
{ok, File_info} = file:read_file_info( File ),
io:fwrite( "Modification time ~p~n", [File_info#file_info.mtime] ),
ok = file:write_file_info( File, File_info#file_info{mtime=calendar:local_time()} ).
You may also check:How to resolve the algorithm Number reversal game step by step in the OCaml programming language
You may also check:How to resolve the algorithm Execute Brain step by step in the Peri programming language
You may also check:How to resolve the algorithm CSV data manipulation step by step in the PicoLisp programming language
You may also check:How to resolve the algorithm Anagrams step by step in the PureBasic programming language
You may also check:How to resolve the algorithm Greatest subsequential sum step by step in the Arturo programming language