50 long time_now = ::time(
NULL);
51 char * time_str = ::ctime(&time_now);
52 time_str[::strlen(time_str) - 1] = 0;
61 h = (int) (seconds / 3600);
63 m = (int) (seconds / 60);
80 return(::stricmp(str1, str2) == 0);
89 return(::stricmp(str1, str2) != 0);
98 WIN32_FIND_DATA find_info;
99 HANDLE file_handle = ::FindFirstFile(filename, &find_info);
101 if (file_handle != INVALID_HANDLE_VALUE) {
102 ::FindClose(file_handle);
122 DWORD attributes = ::GetFileAttributes(filename);
123 return ((attributes != 0xFFFFFFFF) && (attributes & FILE_ATTRIBUTE_READONLY));
129 return (c >=
'a' && c <=
'z') || (c >=
'A' && c <=
'Z');
135 return (c >=
'0' && c <=
'9');
147 return c ==
' ' || c ==
'\t';
155 int length = ::strlen(text);
172 int filesize = file.
Size();
176 WWDEBUG_SAY((
"Error: cMiscUtil::Get_File_Id_String for %s: filesize = %d\n",
177 filename, filesize));
185 IMAGE_FILE_HEADER header = {0};
193 int time_date_stamp = header.TimeDateStamp;
195 char working_filename[500];
196 strcpy(working_filename, filename);
197 ::strupr(working_filename);
202 char * p_start = &working_filename[strlen(working_filename)];
204 while (p_start > working_filename && *(p_start - 1) !=
'\\') {
208 ::memmove(working_filename, p_start, num_chars);
213 str.
Format(
"%s %d %d", working_filename, filesize, time_date_stamp);
223 ::DeleteFile(filename);
bool Get_Image_File_Header(const char *filename, IMAGE_FILE_HEADER *file_header)
virtual bool Is_Available(int forced=false)=0
int _cdecl Format(const TCHAR *format,...)
static bool Is_Numeric(char c)
static LPCSTR Get_Text_Time(void)
static bool File_Is_Read_Only(LPCSTR filename)
static bool Is_Whitespace(char c)
static void Get_File_Id_String(LPCSTR filename, StringClass &str)
static bool File_Exists(LPCSTR filename)
static void Seconds_To_Hms(float seconds, int &h, int &m, int &s)
static void Trim_Trailing_Whitespace(char *text)
static bool Is_String_Different(LPCSTR str1, LPCSTR str2)
static bool Is_Alphanumeric(char c)
static bool Is_String_Same(LPCSTR str1, LPCSTR str2)
static void Remove_File(LPCSTR filename)
static bool Is_Alphabetic(char c)
FileFactoryClass * _TheFileFactory