Waitrud Weber’s blog

things and reminders for memories

WindowsAPI: windows-make: file_info

 fiIt printed the number which might be wrong and it doesn't matter if that is Initialization.

To take time of files, I used the collection of MinGW after I failed to creationtime as windowsapi, which is actually a matter.

*

- - - - -
- > .\winmain_001.exe .\001-2020315-001.txt
main starts.
int numbering(int argc, char** argv ) starts.
int find_numbering_011 (char* filename, int debug_num) starts.
001: filename: .\001-2020315-001.txt
002: filename: .\001-2020315-001.txt
char** FileControler::get_files_012 ( char* lpcstr_path, int* file_num ) starts.
int FileControler::get_file_info ( char *lpcstr_path, char **result ) starts.
cnt_array=21
cnt_directory=2
cnt_asterisk=-1
cnt_period=17
 .\ 001-2020315-001.txt .txt
 .\ 001-2020315-001.txt .txt
int FileControler::get_file_info ( char *lpcstr_path, char **result ) ends.
char* m_concat( char *head, char *tail ) starts.
array_count: nh 2 nt 1 | .\ *
function m_concat: i 0
char* copyof_002 ( char* str ) starts.
array_count 3
char* char_string_002 ( int num_memories ) starts. dummy_allocation_001=00000000
void print_memories_002 () starts.
p|00810508|:dummy_ary[0]=|.\|
p|00810518|:dummy_ary[1]=|001-2020315-001.txt|
p|00810538|:dummy_ary[2]=|.txt|
p|0081AEF8|:dummy_ary[3]=-
void print_memories_002 () ends.
character i 0/10 num_memories 4 about|00000000|
dummy_allocation_001|00810590|
char** put_memories_002 ( char* str ) starts. index 4: index_max 8
char** put_memories_002 ( char* str ) ends.
char* char_string_002 ( int num_memories ) ends.
a_sleep_thread_002 starts.
a_sleep_thread_002 ends.
dummy_allocation_001 point|00810590|
str |00810580| dummy_allocation_001 |00810590|
char* copyof_002 ( char* str ) ends.
011: result|00810590|=|3| l_dummy_allocation_001|00810580|=|3|
char* m_concat( char *head, char *tail ) ends.
lpcstr_path .\001-2020315-001.txt *file_num 46
- - -
- fileinfo - - -
-

> .\winmain_001.exe .\001-02.txt

...

character i 0/10 num_memories 4 about|00000000|
dummy_allocation_001|00F910C8|
char** put_memories_002 ( char* str ) starts. index 4: index_max 8
char** put_memories_002 ( char* str ) ends.
char* char_string_002 ( int num_memories ) ends.
a_sleep_thread_002 starts.
a_sleep_thread_002 ends.
dummy_allocation_001 point|00F910C8|
str |00F910B8| dummy_allocation_001 |00F910C8|
char* copyof_002 ( char* str ) ends.
011: result|00F910C8|=|3| l_dummy_allocation_001|00F910B8|=|3|
char* m_concat( char *head, char *tail ) ends.
file_info 0 .\
file_info 1 001-02.txt
file_info 2 .txt

- - -
-

MinGW

Cleared light.

- - -
- File changed time Wed Mar 01 16:49:13 2023
(char*)ffd.cFileName 001-test-date-001.txt
creattiontime:27160-12-29 22:56:35:786
creattiontime local:27160-12-30 7:56:35:786
updatetime local:27161-7-6 16:42:7:551
creationtime: 7671608
lp_creationtime: 0
lp_creationtime_256: 7700416
t print lp_creationtime: (null)
n   0: cn:  16
n   1: cn:  17
n   2: cn: 117
n   0: cn: -64
- - -
-

#include <stdio.h>
#include <sys/stat.h>
#include <time.h>
...
    stat(".\\001-test-date-001.txt",&filestat);
    /* newline included in ctime() output */
  /*  printf(" File access time %s",
            ctime(&filestat.st_atime)
          );
    printf(" File modify time %s",
            ctime(&filestat.st_mtime)
          );*/
    printf("File changed time %s",
            ctime(&filestat.st_ctime)
          );
/*    printf("  File birth time %s",
            ctime(&filestat.st_birthtime)
          );
*/

- - -
-

[1]Reading File Dates | C For Dummies Blog (c-for-dummies.com)

[2]c - Get last modified time of file in linux - Stack Overflow

[3]How to find a file lastmodified timestamp in C? | Web Hosting Talk

- - -
-

.net framework C#

FileInfo[]

- - -
-

                    // 20190407
                    String creationtime = files[i].CreationTime.ToString();
                    String lastwritetime = files[i].LastWriteTime.ToString();

- - -
-

C++ windowsapi

- - -
- typedef struct _FILETIME {
  DWORD dwLowDateTime;
  DWORD dwHighDateTime;
} FILETIME, *PFILETIME, *LPFILETIME;
- - -
-

dword - Wiktionary

- - -
-

long cast_long_sate;

char cast_charsate[64]; 

- - -
- - - - -
- - - - -
- - - - -


*