File size: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
m (→{{header|Wren}}: Changed to Wren S/H) |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1,216:
<syntaxhighlight lang="frink">println[newJava["java.io.File", "input.txt"].length[]]
println[newJava["java.io.File", "/input.txt"].length[]]</syntaxhighlight>
=={{header|FutureBasic}}==
<syntaxhighlight lang="futurebasic">
local fn DoIt
CFURLRef desktopURL = fn FileManagerURLForDirectory( NSDesktopDirectory, NSUserDomainMask )
CFURLRef url = fn URLByAppendingPathComponent( desktopURL, @"test_file.txt" )
CFDictionaryRef attributes = fn FileManagerAttributesOfItemAtURL( url )
printf @"%@", fn DictionaryObjectForKey( attributes, NSFileSize )
end fn
fn DoIt
HandleEvents
</syntaxhighlight>
=={{header|Gambas}}==
Line 1,382 ⟶ 1,396:
<syntaxhighlight lang="lang">
# Load the IO module
# Replace "<pathToIO.lm>" with the location where the io.lm
ln.loadModule(<pathToIO.lm>)
Line 2,369 ⟶ 2,383:
To check the size of a file in the root, just change "input.txt" to "/input.txt" in the following script.
<syntaxhighlight lang="
var name = "input.txt"
|