{{newin|[[0.10.0]]|100|type=function}}
Callback function triggered when a file is dragged and dropped onto the window.
== Function ==
=== Synopsis ===
<source lang="lua">
love.filedropped( file )
</source>
=== Arguments ===
{{param|DroppedFile|file|The unopened File object representing the file that was dropped.}}
=== Returns ===
Nothing.
== Examples ==
Read and print the file, drag-and-dropped to love window using [[(File):read]] and [[(File):getFilename]].
<source lang="lua">
function love.filedropped(file)
	file:open("r")
	local data = file:read()
	print("Content of " .. file:getFilename() .. ' is')
	print(data)
	print("End of file")
end
</source>

== Notes ==
[[(File):open|File:open]] must be called on the file before reading from or writing to it. [[(File):getFilename|File:getFilename]] will return the full platform-dependent path to the file.
== See Also ==
* [[parent::love]]
* [[love.directorydropped]]
[[Category:Callbacks]]
{{#set:Description=Callback function triggered when a file is dragged and dropped onto the window.}}
{{#set:Subcategory=Window}}
== Other Languages ==
{{i18n|love.filedropped}}