30 lines
470 B
C++
30 lines
470 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <filesystem>
|
|
|
|
namespace C
|
|
{
|
|
constexpr int filePadding= 3;
|
|
}
|
|
|
|
struct Entry
|
|
{
|
|
std::string name;
|
|
std::string perms;
|
|
std::size_t size;
|
|
int year;
|
|
unsigned month;
|
|
unsigned day;
|
|
long int hour;
|
|
long int minute;
|
|
bool is_dir;
|
|
bool is_exe;
|
|
};
|
|
|
|
bool is_exe( std::filesystem::directory_entry entry );
|
|
|
|
std::string drwx( std::filesystem::directory_entry entry );
|
|
|
|
std::string format_entry( const Entry &entry, std::size_t widest );
|