FileGetPath: Difference between revisions
Jump to navigation
Jump to search
m (fix version) |
(Add OOP syntax) |
||
Line 9: | Line 9: | ||
string fileGetPath ( file theFile ) | string fileGetPath ( file theFile ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{OOP||[[file]]:getPath|path}} | |||
===Required Arguments=== | ===Required Arguments=== |
Revision as of 21:20, 31 May 2022
This function retrieves the path of the given file.
Syntax
string fileGetPath ( file theFile )
OOP Syntax Help! I don't understand this!
- Method: file:getPath(...)
- Variable: .path
Required Arguments
- theFile: The file you want to get the path.
Returns
Returns a string representing the file path, false if invalid file was provided.
Example
Click to collapse [-]
Server Example 1local newFile = fileCreate("test.txt") -- attempt to create a new file if (newFile) then -- check if the creation succeeded local path = fileGetPath(newFile) outputChatBox("New file created at: "..path, root, 0, 255, 0) fileClose(newFile) -- close the file once you're done with it end
See Also
- fileClose
- fileCopy
- fileCreate
- fileDelete
- fileExists
- fileFlush
- fileGetPath
- fileGetPos
- fileGetSize
- fileIsEOF
- fileOpen
- fileRead
- fileRename
- fileSetPos
- fileWrite