rodo/io.rkt

44 lines
851 B
Racket
Raw Normal View History

2018-04-12 18:25:19 +00:00
#lang racket/base
(require "config.rkt")
(provide (all-defined-out))
(define (check-for-file)
(file-exists?
(expand-user-path
(string-append
program-path
program-directory
program-file))))
(define (create-file)
(let
([path
(expand-user-path
(string-append
program-path
program-directory
program-file))])
(let
([opened-file
(open-output-file
path
#:mode 'text
#:exists 'can-update)])
(close-output-port opened-file))))
(define (check-for-folder)
(directory-exists?
(expand-user-path
(string-append
program-path
program-directory))))
(define (create-folder)
(make-directory
(expand-user-path
(string-append
program-path
program-directory))))