+static
+void print_dirent(FILINFO *f)
+{
+ printf_P(PSTR("%c%c%c%c%c %u/%02u/%02u %02u:%02u %9lu %s\n"),
+ (f->fattrib & AM_DIR) ? 'D' : '-',
+ (f->fattrib & AM_RDO) ? 'R' : '-',
+ (f->fattrib & AM_HID) ? 'H' : '-',
+ (f->fattrib & AM_SYS) ? 'S' : '-',
+ (f->fattrib & AM_ARC) ? 'A' : '-',
+ (f->fdate >> 9) + 1980, (f->fdate >> 5) & 15, f->fdate & 31,
+ (f->ftime >> 11), (f->ftime >> 5) & 63,
+ f->fsize, f->fname);
+}
+
+char *path_split(char *p)
+{
+ if (isdigit(p[0]) && (p[1] == ':'))
+ p += 2;
+
+ char *ps = strrchr(p, '/');
+ if (ps) {
+ if (ps == p) {
+ ++ps;
+ memmove(ps+1, ps, strlen(ps)+1);
+ }
+ *ps++ = '\0';
+ }
+
+ return ps;
+}
+