[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DOS3.3 program in cc65?



<wssimms@gmail.com> wrote:

> Maybe I'm misunderstanding you, but set_file_info will set the 
> modification date of a file. If you want to change the creation date, it 
> seems like you could open the containing directory as a file, scan for the 
> entry and update it. If that's no good for some reason, you have 
> read_block and write_block...

Opening the containing directory for writing is an excellent suggestion and 
no, you were not misunderstanding me... it is both dates that I want to 
muck-with. Strange as it may seem, it honestly never dawned on me to write 
to the blocks despite the fact that as a matter of course I read from 
them... admittedly a brain-dead question... thanks for the help.

Now if I could find a ProDOS 8 call to grow back my hair I would be even 
happier:)

Bill

/* based on directory file entries */
struct filefind{
    unsigned char length;   /* low nibble = file name length */
    char name[15];
    unsigned char  type;
    unsigned key;
    unsigned blocks;
    unsigned size;
    unsigned char  size3;       /* highest byte of 3 byte filesize integer 
*/
    unsigned create_date;
    unsigned create_time;
    unsigned char  version;
    unsigned char  minversion;
    unsigned char  access;
    unsigned address;   /* load adress (subtype) low-byte */
    unsigned mod_date;
    unsigned mod_time;
    unsigned hdr;
    };