# modules/dosfs/dosfs.c File Reference

`#include <string.h>`
`#include <stdlib.h>`
`#include "dosfs.h"`

## Defines
#define | div(a, b) ldiv(a,b)
## Functions
uint32_t | DFS_GetPtnStart (uint8_t unit, uint8_t *scratchsector, uint8_t pnum, uint8_t *pactive, uint8_t *pptype, uint32_t *psize)
uint32_t | DFS_GetVolInfo (uint8_t unit, uint8_t *scratchsector, uint32_t startsector, PVOLINFO volinfo)
uint32_t | DFS_GetFAT (PVOLINFO volinfo, uint8_t *scratch, uint32_t *scratchcache, uint32_t cluster)
uint32_t | DFS_SetFAT (PVOLINFO volinfo, uint8_t *scratch, uint32_t *scratchcache, uint32_t cluster, uint32_t new_contents)
uint8_t * | DFS_CanonicalToDir (uint8_t *dest, uint8_t *src)
uint32_t | DFS_GetFreeFAT (PVOLINFO volinfo, uint8_t *scratch)
uint32_t | DFS_OpenDir (PVOLINFO volinfo, uint8_t *dirname, PDIRINFO dirinfo)
uint32_t | DFS_GetNext (PVOLINFO volinfo, PDIRINFO dirinfo, PDIRENT dirent)
uint32_t | DFS_GetFreeDirEnt (PVOLINFO volinfo, uint8_t *path, PDIRINFO di, PDIRENT de)
uint32_t | DFS_OpenFile (PVOLINFO volinfo, uint8_t *path, uint8_t mode, uint8_t *scratch, PFILEINFO fileinfo)
uint32_t | DFS_ReadFile (PFILEINFO fileinfo, uint8_t *scratch, uint8_t *buffer, uint32_t *successcount, uint32_t len)
void | DFS_Seek (PFILEINFO fileinfo, uint32_t offset, uint8_t *scratch)
uint32_t | DFS_UnlinkFile (PVOLINFO volinfo, uint8_t *path, uint8_t *scratch)
uint32_t | DFS_WriteFile (PFILEINFO fileinfo, uint8_t *scratch, uint8_t *buffer, uint32_t *successcount, uint32_t len)
uint32_t | DFS_Close (PFILEINFO fileinfo)

## Define Documentation

#define div | ( | a,
|  | b |  | ) | ldiv(a,b)

## Function Documentation

uint8_t* DFS_CanonicalToDir | ( | uint8_t * | dest,
|  | uint8_t * | src |
| ) |  |  |

uint32_t DFS_Close | ( | PFILEINFO | fileinfo | ) |

uint32_t DFS_GetFAT | ( | PVOLINFO | volinfo,
|  | uint8_t * | scratch,
|  | uint32_t * | scratchcache,
|  | uint32_t | cluster |
| ) |  |  |

Here is the call graph for this function:

uint32_t DFS_GetFreeDirEnt | ( | PVOLINFO | volinfo,
|  | uint8_t * | path,
|  | PDIRINFO | di,
|  | PDIRENT | de |
| ) |  |  |

Here is the call graph for this function:

uint32_t DFS_GetFreeFAT | ( | PVOLINFO | volinfo,
|  | uint8_t * | scratch |
| ) |  |  |

Here is the call graph for this function:

uint32_t DFS_GetNext | ( | PVOLINFO | volinfo,
|  | PDIRINFO | dirinfo,
|  | PDIRENT | dirent |
| ) |  |  |

Here is the call graph for this function:

uint32_t DFS_GetPtnStart | ( | uint8_t | unit,
|  | uint8_t * | scratchsector,
|  | uint8_t | pnum,
|  | uint8_t * | pactive,
|  | uint8_t * | pptype,
|  | uint32_t * | psize |
| ) |  |  |

uint32_t DFS_GetVolInfo | ( | uint8_t | unit,
|  | uint8_t * | scratchsector,
|  | uint32_t | startsector,
|  | PVOLINFO | volinfo |
| ) |  |  |

Here is the call graph for this function:

uint32_t DFS_OpenDir | ( | PVOLINFO | volinfo,
|  | uint8_t * | dirname,
|  | PDIRINFO | dirinfo |
| ) |  |  |

Here is the call graph for this function:

uint32_t DFS_OpenFile | ( | PVOLINFO | volinfo,
|  | uint8_t * | path,
|  | uint8_t | mode,
|  | uint8_t * | scratch,
|  | PFILEINFO | fileinfo |
| ) |  |  |

Here is the call graph for this function:

uint32_t DFS_ReadFile | ( | PFILEINFO | fileinfo,
|  | uint8_t * | scratch,
|  | uint8_t * | buffer,
|  | uint32_t * | successcount,
|  | uint32_t | len |
| ) |  |  |

Here is the call graph for this function:

void DFS_Seek | ( | PFILEINFO | fileinfo,
|  | uint32_t | offset,
|  | uint8_t * | scratch |
| ) |  |  |

Here is the call graph for this function:

uint32_t DFS_SetFAT | ( | PVOLINFO | volinfo,
|  | uint8_t * | scratch,
|  | uint32_t * | scratchcache,
|  | uint32_t | cluster,
|  | uint32_t | new_contents |
| ) |  |  |

Here is the call graph for this function:

uint32_t DFS_UnlinkFile | ( | PVOLINFO | volinfo,
|  | uint8_t * | path,
|  | uint8_t * | scratch |
| ) |  |  |

Here is the call graph for this function:

uint32_t DFS_WriteFile | ( | PFILEINFO | fileinfo,
|  | uint8_t * | scratch,
|  | uint8_t * | buffer,
|  | uint32_t * | successcount,
|  | uint32_t | len |
| ) |  |  |

Here is the call graph for this function: