Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,8 +0,0 @@
with Ada.Directories; use Ada.Directories;
with Ada.Text_IO; use Ada.Text_IO;
procedure Test_File_Size is
begin
Put_Line (File_Size'Image (Size ("input.txt")) & " bytes");
Put_Line (File_Size'Image (Size ("/input.txt")) & " bytes");
end Test_File_Size;

View file

@ -1,4 +0,0 @@
@echo off
if not exist "%~1" exit /b 1 & rem If file doesn't exist exit with error code of 1.
for /f %%i in (%~1) do echo %~zi
pause>nul

View file

@ -1,42 +0,0 @@
identification division.
program-id. FileInfo.
data division.
working-storage section.
01 file-name pic x(256).
01 file-size-edited pic zzz,zzz,zzz.
01 file-details.
05 file-size pic x(8) comp-x.
05 file-date.
10 file-day pic x comp-x.
10 file-month pic x comp-x.
10 file-year pic xx comp-x.
05 file-time.
10 file-hour pic x comp-x.
10 file-minute pic x comp-x.
10 file-second pic x comp-x.
10 file-hundredths pic x comp-x.
procedure division.
main.
move "input.txt" to file-name
perform file-info
move "\input.txt" to file-name
perform file-info
stop run
.
file-info.
call "CBL_CHECK_FILE_EXIST"
using file-name, file-details
returning return-code
if return-code = 0
move file-size to file-size-edited
display function trim(file-name) " "
function trim(file-size-edited) " Bytes"
else
display function trim(file-name) " not found!"
end-if
.

View file

@ -1,7 +1,7 @@
import system'io;
import extensions;
public program()
public Program()
{
Console.printLine(File.assign("input.txt").Length);

View file

@ -1,3 +0,0 @@
(message "sizes are %s and %s"
(nth 7 (file-attributes "input.txt"))
(nth 7 (file-attributes "/input.txt")))

View file

@ -1,24 +0,0 @@
include file.e
function file_size(sequence file_name)
object x
x = dir(file_name)
if sequence(x) and length(x) = 1 then
return x[1][D_SIZE]
else
return -1 -- the file does not exist
end if
end function
procedure test(sequence file_name)
integer size
size = file_size(file_name)
if size < 0 then
printf(1,"%s file does not exist.\n",{file_name})
else
printf(1,"%s size is %d.\n",{file_name,size})
end if
end procedure
test("input.txt") -- in the current working directory
test("/input.txt") -- in the file system root

View file

@ -1,2 +0,0 @@
Get-ChildItem input.txt | Select-Object Name,Length
Get-ChildItem \input.txt | Select-Object Name,Length

View file

@ -1,4 +0,0 @@
size? %info.txt
size? %/info.txt
size? ftp://username:password@ftp.site.com/info.txt
size? http://rosettacode.org

View file

@ -1,4 +0,0 @@
With CreateObject("Scripting.FileSystemObject")
WScript.Echo .GetFile("input.txt").Size
WScript.Echo .GetFile("\input.txt").Size
End With