dosutils: use NCP87 DOS info fields in NDIR
Add a Client32 NCP87 helper for obtaining DOS namespace file and subdirectory information and use it in NDIR. The new helper reads the classic NCP87 subfunction 6 RIM_ALL DOS info block, including timestamps, inherited rights, directory identifiers and size metadata. Use the NCP87 inherited rights mask for the inherited-rights column while keeping the existing Client32 effective-rights path for the effective rights column. Also use the NCP87 modify, archive, last-access and creation date fields for the /DATES display, falling back to DOS findfirst timestamps when the NCP87 info request is not available. Tighten the /DATES layout so the full Created/Copied timestamp remains within an 80-column DOS screen.
This commit is contained in:
37
c32ncp.h
37
c32ncp.h
@@ -12,6 +12,43 @@ int c32_ncp87_obtain_rim_attributes(const char *name,
|
||||
uint16 *handle_hi_out);
|
||||
|
||||
|
||||
typedef struct c32_ndir_info {
|
||||
uint32 space_allocated;
|
||||
uint32 attributes;
|
||||
uint16 flags;
|
||||
uint32 data_size;
|
||||
uint32 total_size;
|
||||
uint16 number_of_streams;
|
||||
uint16 creation_time;
|
||||
uint16 creation_date;
|
||||
uint32 creator_id;
|
||||
uint16 modify_time;
|
||||
uint16 modify_date;
|
||||
uint32 modifier_id;
|
||||
uint16 last_access_date;
|
||||
uint16 archive_time;
|
||||
uint16 archive_date;
|
||||
uint32 archiver_id;
|
||||
uint16 inherited_rights;
|
||||
uint32 dir_ent_num;
|
||||
uint32 dos_dir_num;
|
||||
uint32 vol_number;
|
||||
uint32 ea_data_size;
|
||||
uint32 ea_key_count;
|
||||
uint32 ea_key_size;
|
||||
uint32 ns_creator;
|
||||
uint8 name_len;
|
||||
char name[256];
|
||||
} C32_NDIR_INFO;
|
||||
|
||||
int c32_ncp87_obtain_ndir_info(const char *path_name,
|
||||
uint16 dir_handle,
|
||||
C32_NDIR_INFO *info_out,
|
||||
uint16 *actual_out,
|
||||
uint16 *handle_lo_out,
|
||||
uint16 *handle_hi_out);
|
||||
|
||||
|
||||
int c32_ncp87_modify_dos_attributes(char *name,
|
||||
uint16 dir_handle,
|
||||
uint32 attrs,
|
||||
|
||||
Reference in New Issue
Block a user