Skip to content

Commit dd926ce

Browse files
0x26
1 parent 70785ab commit dd926ce

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed

docs/source/os.rst

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -975,6 +975,96 @@ CLOSEDIR
975975
:errno: EINVAL, FR_INT_ERR, FR_INVALID_OBJECT, FR_TIMEOUT
976976
977977
978+
TELLDIR
979+
-------
980+
981+
.. c:function:: long f_telldir (int dirdes)
982+
983+
|
984+
985+
Returns the read position of the directory descriptor.
986+
987+
:Op code: RIA_OP_TELLDIR 0x23
988+
:C proto: rp6502.h
989+
:param dirdes: Directory descriptor from f_opendir().
990+
:returns: Read position. -1 on error.
991+
:a regs: dirdes
992+
:errno: EINVAL, EBADF
993+
994+
995+
SEEKDIR
996+
-------
997+
998+
.. c:function:: int f_seekdir (long offs, int dirdes)
999+
1000+
|
1001+
1002+
Set the read position for the directory descriptor. Internally,
1003+
the FatFs directory read position can only move forward by one,
1004+
so use this for convienence, not performance.
1005+
1006+
:Op code: RIA_OP_SEEKDIR 0x24
1007+
:C proto: rp6502.h
1008+
:param dirdes: Directory descriptor from f_opendir().
1009+
:returns: Read position. -1 on error.
1010+
:a regs: return, dirdes
1011+
:errno: EINVAL, EBADF, FR_DISK_ERR, FR_INT_ERR, FR_INVALID_OBJECT, FR_TIMEOUT, FR_NOT_ENOUGH_CORE
1012+
1013+
1014+
REWINDDIR
1015+
---------
1016+
1017+
.. c:function:: int f_rewinddir (int dirdes)
1018+
1019+
|
1020+
1021+
Rewind the read position of the directory descriptor.
1022+
1023+
:Op code: RIA_OP_REWINDDIR 0x25
1024+
:C proto: rp6502.h
1025+
:param dirdes: Directory descriptor from f_opendir().
1026+
:returns: 0 on success. -1 on error.
1027+
:a regs: dirdes
1028+
:errno: EINVAL, EBADF, FR_DISK_ERR, FR_INT_ERR, FR_INVALID_OBJECT, FR_TIMEOUT, FR_NOT_ENOUGH_CORE
1029+
1030+
1031+
CHMOD
1032+
-----
1033+
1034+
.. c:function:: int f_chmod (const char* path, unsigned char attr, unsigned char mask)
1035+
1036+
|
1037+
1038+
Change the attributes of a file or directory.
1039+
1040+
:Op code: RIA_OP_CHMOD 0x26
1041+
:C proto: rp6502.h
1042+
:param path: Pathname to a file or directory.
1043+
:param attr: New bitfield of attributes. See table.
1044+
:param mask: Only attributes with bits set here will be changed.
1045+
:returns: 0 on success. -1 on error.
1046+
:a regs: return, mask
1047+
:errno: EINVAL, FR_DISK_ERR, FR_INT_ERR, FR_NOT_READY, FR_NO_FILE, FR_NO_PATH, FR_INVALID_NAME, FR_WRITE_PROTECTED, FR_INVALID_DRIVE, FR_NOT_ENABLED, FR_NO_FILESYSTEM, FR_TIMEOUT, FR_NOT_ENOUGH_CORE
1048+
1049+
.. list-table::
1050+
:header-rows: 1
1051+
:widths: 25 25
1052+
1053+
* - Attribute
1054+
- Bit
1055+
* - Read Only
1056+
- 0x01
1057+
* - Hidden
1058+
- 0x02
1059+
* - System
1060+
- 0x04
1061+
* - Directory
1062+
- 0x10
1063+
* - Archive
1064+
- 0x20
1065+
1066+
1067+
9781068
EXIT
9791069
----
9801070

0 commit comments

Comments
 (0)