FileGetPath: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Gravestone (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
{{Server client function}} | {{Server client function}} | ||
{{New feature/item|3.0160|1.6|7446| | {{New feature/item|3.0160|1.6|7446| | ||
This function retrieves the path of the given file. | |||
}} | }} | ||
Line 14: | Line 14: | ||
===Returns=== | ===Returns=== | ||
Returns a ''string'' | Returns a ''string'' representing the file path, ''false'' if invalid file was provided. | ||
==Example== | ==Example== | ||
<section name="Shared example 1" class="shared" show="true"> | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local newFile = fileCreate("test.txt") -- attempt to create a new file | local newFile = fileCreate("test.txt") -- attempt to create a new file | ||
Line 25: | Line 25: | ||
fileClose(newFile) -- close the file once you're done with it | fileClose(newFile) -- close the file once you're done with it | ||
end | end | ||
</syntaxhighlight> | </syntaxhighlight></section> | ||
==See Also== | ==See Also== | ||
{{File functions}} | {{File functions}} |
Revision as of 10:24, 22 October 2016
This function retrieves the path of the given file.
Syntax
string fileGetPath ( file theFile )
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
See Also
- fileClose
- fileCopy
- fileCreate
- fileDelete
- fileExists
- fileFlush
- fileGetPath
- fileGetPos
- fileGetSize
- fileIsEOF
- fileOpen
- fileRead
- fileRename
- fileSetPos
- fileWrite