Skip to content

Commit

Permalink
document filesystem/handle + remove valve header on files that aren't…
Browse files Browse the repository at this point in the history
… valves
  • Loading branch information
luttje committed Aug 12, 2024
1 parent 19b9b75 commit b14173f
Show file tree
Hide file tree
Showing 195 changed files with 2,126 additions and 1,321 deletions.
29 changes: 29 additions & 0 deletions docs/classes/FileHandle/Read.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
template: lua-class-function.html
title: Read
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: FileHandle
function: Read
realm: shared
description: "Read from a file."

arguments:
- name: "size"
type: number
default: "GET_FILE_SIZE"
returns:
- type: integer
description: "The number of bytes read."
- type: string
description: "The data read."
---

<div class="lua__search__keywords">
FileHandle:Read &#x2013; Read from a file.
</div>
24 changes: 24 additions & 0 deletions docs/classes/FileHandle/Size.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
template: lua-class-function.html
title: Size
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: FileHandle
function: Size
realm: shared
description: "Get the size of a file."


returns:
- type: integer
description: "The size of the file."
---

<div class="lua__search__keywords">
FileHandle:Size &#x2013; Get the size of a file.
</div>
26 changes: 26 additions & 0 deletions docs/classes/FileHandle/Write.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
template: lua-class-function.html
title: Write
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: FileHandle
function: Write
realm: shared
description: "Write to a file."

arguments:
- name: "file"
type: FileHandle
returns:
- type: integer
description: "The number of bytes written."
---

<div class="lua__search__keywords">
FileHandle:Write &#x2013; Write to a file.
</div>
26 changes: 26 additions & 0 deletions docs/classes/FileHandle/__eq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
template: lua-class-function.html
title: __eq
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: FileHandle
function: __eq
realm: shared
description: "Check if two file handles are equal."

arguments:
- name: "file2"
type: FileHandle
returns:
- type: boolean
description: "true if the file handles are equal, false otherwise."
---

<div class="lua__search__keywords">
FileHandle:__eq &#x2013; Check if two file handles are equal.
</div>
23 changes: 23 additions & 0 deletions docs/classes/FileHandle/__gc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
template: lua-class-function.html
title: __gc
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: FileHandle
function: __gc
realm: shared
description: "Close a file."


returns:

---

<div class="lua__search__keywords">
FileHandle:__gc &#x2013; Close a file.
</div>
24 changes: 24 additions & 0 deletions docs/classes/FileHandle/__len.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
template: lua-class-function.html
title: __len
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: FileHandle
function: __len
realm: shared
description: "Get the length of a file."


returns:
- type: integer
description: "The length of the file or nil if the file handle is invalid."
---

<div class="lua__search__keywords">
FileHandle:__len &#x2013; Get the length of a file.
</div>
24 changes: 24 additions & 0 deletions docs/classes/FileHandle/__tostring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
template: lua-class-function.html
title: __tostring
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: FileHandle
function: __tostring
realm: shared
description: "Get the string representation of a file handle."


returns:
- type: string
description: "The string representation of the file handle."
---

<div class="lua__search__keywords">
FileHandle:__tostring &#x2013; Get the string representation of a file handle.
</div>
2 changes: 1 addition & 1 deletion docs/general/conventions.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ See the `.editorconfig` file for the code style.
- `sv_` for server files

- Variables and functions are not abbreviated, with the exception of these
abbreviations:
common abbreviations:

- `Hud`
- `Ui`
Expand Down
28 changes: 28 additions & 0 deletions docs/libraries/Files/AddPackFile.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
template: lua-library-function.html
title: AddPackFile
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: Files
function: AddPackFile
realm: shared
description: "Add a pack file to the search path."

arguments:
- name: "path"
type: string
- name: "pathId"
type: string
returns:
- type: boolean
description: "true if the pack file was added, false otherwise."
---

<div class="lua__search__keywords">
Files.AddPackFile &#x2013; Add a pack file to the search path.
</div>
30 changes: 30 additions & 0 deletions docs/libraries/Files/AddSearchPath.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
template: lua-library-function.html
title: AddSearchPath
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: Files
function: AddSearchPath
realm: shared
description: "Add a search path to the filesystem."

arguments:
- name: "path"
type: string
- name: "pathId"
type: string
- name: "addType"
type: number
default: "PATH_ADD_TO_TAIL"
returns:

---

<div class="lua__search__keywords">
Files.AddSearchPath &#x2013; Add a search path to the filesystem.
</div>
23 changes: 23 additions & 0 deletions docs/libraries/Files/BeginMapAccess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
template: lua-library-function.html
title: BeginMapAccess
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: Files
function: BeginMapAccess
realm: shared
description: "Begin map access."


returns:

---

<div class="lua__search__keywords">
Files.BeginMapAccess &#x2013; Begin map access.
</div>
25 changes: 25 additions & 0 deletions docs/libraries/Files/CancelWaitForResources.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
template: lua-library-function.html
title: CancelWaitForResources
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: Files
function: CancelWaitForResources
realm: shared
description: "Cancel waiting for resources."

arguments:
- name: "id"
type: number
returns:

---

<div class="lua__search__keywords">
Files.CancelWaitForResources &#x2013; Cancel waiting for resources.
</div>
25 changes: 25 additions & 0 deletions docs/libraries/Files/Close.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
template: lua-library-function.html
title: Close
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: Files
function: Close
realm: shared
description: "Close a file."

arguments:
- name: "file"
type: FileHandle
returns:

---

<div class="lua__search__keywords">
Files.Close &#x2013; Close a file.
</div>
28 changes: 28 additions & 0 deletions docs/libraries/Files/CreateDirectoryHierarchy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
template: lua-library-function.html
title: CreateDirectoryHierarchy
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: Files
function: CreateDirectoryHierarchy
realm: shared
description: "Create a directory hierarchy."

arguments:
- name: "path"
type: string
- name: "pathId"
type: string
default: "0"
returns:

---

<div class="lua__search__keywords">
Files.CreateDirectoryHierarchy &#x2013; Create a directory hierarchy.
</div>
23 changes: 23 additions & 0 deletions docs/libraries/Files/DiscardPreloadData.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
template: lua-library-function.html
title: DiscardPreloadData
icon: lua-shared
tags:
- lua
- shared
- needs-verification
- needs-example
lua:
library: Files
function: DiscardPreloadData
realm: shared
description: "Discard preload data."


returns:

---

<div class="lua__search__keywords">
Files.DiscardPreloadData &#x2013; Discard preload data.
</div>
Loading

0 comments on commit b14173f

Please sign in to comment.