Skip to content

Commit

Permalink
Rewrite touch command
Browse files Browse the repository at this point in the history
  • Loading branch information
bill88t committed Jan 18, 2024
1 parent f8f5021 commit b00dd3f
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions LjinuxRoot/bin/touch.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
rename_process("touch")
try:
with ljinux.api.fopen(ljinux.based.user_vars["argj"].split()[1]):
vr("opts", ljinux.api.xarg())

for pv[get_pid()]["i"] in vr("opts")["w"]:
if ljinux.api.isdir(vr("i")) != 2:
ljinux.based.error(10)
except OSError:
with ljinux.api.fopen(ljinux.based.user_vars["argj"].split()[1], "w") as pv[
get_pid()
]["f"]:
if vr("f") is None:
ljinux.based.error(7)
else:
with ljinux.api.fopen(vr("i"), "w") as pv[get_pid()]["f"]:
if vr("f") is None:
ljinux.based.error(7)

0 comments on commit b00dd3f

Please sign in to comment.