Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
1
Task/Delete-a-file/Ada/delete-a-file-1.adb
Normal file
1
Task/Delete-a-file/Ada/delete-a-file-1.adb
Normal file
|
|
@ -0,0 +1 @@
|
|||
with Ada.Directories; use Ada.Directories;
|
||||
4
Task/Delete-a-file/Ada/delete-a-file-2.adb
Normal file
4
Task/Delete-a-file/Ada/delete-a-file-2.adb
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
Delete_File ("input.txt");
|
||||
Delete_File ("/input.txt");
|
||||
Delete_Tree ("docs");
|
||||
Delete_Tree ("/docs");
|
||||
22
Task/Delete-a-file/COBOL/delete-a-file-1.cob
Normal file
22
Task/Delete-a-file/COBOL/delete-a-file-1.cob
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. Delete-Files.
|
||||
|
||||
ENVIRONMENT DIVISION.
|
||||
INPUT-OUTPUT SECTION.
|
||||
FILE-CONTROL.
|
||||
SELECT Local-File ASSIGN TO "input.txt".
|
||||
SELECT Root-File ASSIGN TO "/input.txt".
|
||||
|
||||
DATA DIVISION.
|
||||
FILE SECTION.
|
||||
FD Local-File.
|
||||
01 Local-Record PIC X.
|
||||
FD Root-File.
|
||||
01 Root-Record PIC X.
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
DELETE FILE Local-File
|
||||
DELETE FILE Root-File
|
||||
GOBACK.
|
||||
|
||||
END PROGRAM Delete-Files.
|
||||
12
Task/Delete-a-file/COBOL/delete-a-file-2.cob
Normal file
12
Task/Delete-a-file/COBOL/delete-a-file-2.cob
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
IDENTIFICATION DIVISION.
|
||||
PROGRAM-ID. Delete-Files.
|
||||
|
||||
PROCEDURE DIVISION.
|
||||
CALL "CBL_DELETE_FILE" USING "input.txt"
|
||||
CALL "CBL_DELETE_DIR" USING "docs"
|
||||
CALL "CBL_DELETE_FILE" USING "/input.txt"
|
||||
CALL "CBL_DELETE_DIR" USING "/docs"
|
||||
|
||||
GOBACK.
|
||||
|
||||
END PROGRAM Delete-Files.
|
||||
4
Task/Delete-a-file/Emacs-Lisp/delete-a-file.el
Normal file
4
Task/Delete-a-file/Emacs-Lisp/delete-a-file.el
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
(delete-file "input.txt")
|
||||
(delete-directory "docs")
|
||||
(delete-file "/input.txt")
|
||||
(delete-directory "/docs")
|
||||
9
Task/Delete-a-file/Gleam/delete-a-file.gleam
Normal file
9
Task/Delete-a-file/Gleam/delete-a-file.gleam
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import simplifile
|
||||
|
||||
pub fn main() {
|
||||
// simplifile.delete function deletes a file or directory.
|
||||
let assert Ok(_) = simplifile.delete("docs")
|
||||
let assert Ok(_) = simplifile.delete("input.txt")
|
||||
let assert Ok(_) = simplifile.delete("/docs")
|
||||
let assert Ok(_) = simplifile.delete("/input.txt")
|
||||
}
|
||||
6
Task/Delete-a-file/PowerShell/delete-a-file.ps1
Normal file
6
Task/Delete-a-file/PowerShell/delete-a-file.ps1
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# possible aliases for Remove-Item: rm, del, ri
|
||||
Remove-Item input.txt
|
||||
Remove-Item \input.txt # file system root
|
||||
|
||||
Remove-Item -Recurse docs # recurse for deleting folders including content
|
||||
Remove-Item -Recurse \docs
|
||||
7
Task/Delete-a-file/Rebol/delete-a-file.rebol
Normal file
7
Task/Delete-a-file/Rebol/delete-a-file.rebol
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
; Local.
|
||||
delete %input.txt
|
||||
delete-dir %docs/
|
||||
|
||||
; Root.
|
||||
delete %/input.txt
|
||||
delete-dir %/docs/
|
||||
5
Task/Delete-a-file/Rye/delete-a-file.rye
Normal file
5
Task/Delete-a-file/Rye/delete-a-file.rye
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
rm %input.txt
|
||||
rmdir %docs
|
||||
|
||||
rm %/input.txt
|
||||
rmdir %/docs
|
||||
2
Task/Delete-a-file/Uiua/delete-a-file.uiua
Normal file
2
Task/Delete-a-file/Uiua/delete-a-file.uiua
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
&fde "example.txt" # delete
|
||||
&ftr "example.txt" # move to trash
|
||||
21
Task/Delete-a-file/VBScript/delete-a-file.vbs
Normal file
21
Task/Delete-a-file/VBScript/delete-a-file.vbs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
Set oFSO = CreateObject( "Scripting.FileSystemObject" )
|
||||
|
||||
oFSO.DeleteFile "input.txt"
|
||||
oFSO.DeleteFolder "docs"
|
||||
|
||||
oFSO.DeleteFile "\input.txt"
|
||||
oFSO.DeleteFolder "\docs"
|
||||
|
||||
'Using Delete on file and folder objects
|
||||
|
||||
dim fil, fld
|
||||
|
||||
set fil = oFSO.GetFile( "input.txt" )
|
||||
fil.Delete
|
||||
set fld = oFSO.GetFolder( "docs" )
|
||||
fld.Delete
|
||||
|
||||
set fil = oFSO.GetFile( "\input.txt" )
|
||||
fil.Delete
|
||||
set fld = oFSO.GetFolder( "\docs" )
|
||||
fld.Delete
|
||||
Loading…
Add table
Add a link
Reference in a new issue