Jump to content

File size: Difference between revisions

841 bytes added ,  11 months ago
Initial FutureBasic task solution added
m (Update Lang example: Fix spelling of Lang)
(Initial FutureBasic task solution added)
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>
{{output}}
<pre>
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
</pre>
 
=={{header|Gambas}}==
719

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.