- improved signal handling
- variable fec output buffer size
- --log_color actually works
+ - new ls option: -d (print dates as seconds after the epoch)
-----------------------------------------
0.3.4 (2009-05-07) "elliptic inheritance"
N: ls
P: AFS_READ
D: List audio files.
-U: ls [-l[s|l|v|m]] -p -a -r -s{p|s|l|n|f|c|i|y|b|d|a} [pattern...]
+U: ls [-l[s|l|v|m]] [-p] [-a] [-r] [-d] [-s{p|s|l|n|f|c|i|y|b|d|a}] [pattern...]
H: Print a list of all audio files matching pattern.
H:
H: Options:
H:
H: -r Reverse sort order.
H:
+H: -d Print dates as seconds after the epoch.
+H:
H: -s Change sort order. Defaults to alphabetical path sort if not given.
H:
H: -sp: sort by path.
LS_FLAG_ADMISSIBLE_ONLY = 2,
/** -r */
LS_FLAG_REVERSE = 4,
+ /** -d */
+ LS_FLAG_UNIXDATE = 8,
};
/**
goto out;
}
get_attribute_bitmap(&afsi->attributes, att_buf);
- ret = get_local_time(&afsi->last_played, last_played_time,
- sizeof(last_played_time), current_time, opts->mode);
- if (ret < 0)
- goto out;
+ if (opts->flags & LS_FLAG_UNIXDATE)
+ sprintf(last_played_time, "%llu",
+ (long long unsigned)afsi->last_played);
+ else {
+ ret = get_local_time(&afsi->last_played, last_played_time,
+ sizeof(last_played_time), current_time, opts->mode);
+ if (ret < 0)
+ goto out;
+ }
get_duration_buf(afhi->seconds_total, duration_buf, opts);
if (have_score) {
if (opts->mode == LS_MODE_LONG)
flags |= LS_FLAG_REVERSE;
continue;
}
+ if (!strcmp(arg, "-d")) {
+ flags |= LS_FLAG_UNIXDATE;
+ continue;
+ }
if (!strncmp(arg, "-s", 2)) {
if (!*(arg + 2) || *(arg + 3))
return -E_AFT_SYNTAX;