can now write to files!

main
m455 2018-04-06 10:51:42 -04:00
parent b8ecf24c1c
commit a0e3b9a4e3
1 changed files with 8 additions and 2 deletions

View File

@ -1,7 +1,7 @@
#! /usr/bin/env racket #! /usr/bin/env racket
#lang racket/base #lang racket/base
(require racket/vector) (require racket/vector racket/file)
(define program-name "rodo") (define program-name "rodo")
(define program-directory ".rodo/") (define program-directory ".rodo/")
@ -121,9 +121,15 @@
(open-output-file path (open-output-file path
#:mode 'text #:mode 'text
#:exists 'can-update)]) #:exists 'can-update)])
;;TODO ;;TODO:
;;I think i can write to file with ;;I think i can write to file with
;;a function right here... ;;a function right here...
;;NOTE: this works when doing `./rodo.rkt init`,
;;just gotta separate it into another function
(write-to-file "test"
path
#:mode 'text
#:exists 'append)
(close-output-port opened-file)))) (close-output-port opened-file))))
(define (create-folder) (define (create-folder)