From 8dcdeb64d0bd1d212571abc88c7b08c0eea1b9f8 Mon Sep 17 00:00:00 2001 From: Duncan McGreggor Date: Sun, 26 Nov 2023 22:45:54 -0600 Subject: [PATCH] Saved file buffers. --- src/dirs-mac.lfe | 44 ++++++++++++++++++++++---------------------- src/dirs-win.lfe | 42 +++++++++++++++++++++--------------------- src/dirs.app.src | 1 - 3 files changed, 43 insertions(+), 44 deletions(-) diff --git a/src/dirs-mac.lfe b/src/dirs-mac.lfe index 8bb09dc..cc93be6 100644 --- a/src/dirs-mac.lfe +++ b/src/dirs-mac.lfe @@ -1,30 +1,30 @@ (defmodule dirs-mac (export all)) -extern crate dirs_sys; +;;extern crate dirs_sys; -use std::path::PathBuf; +;;use std::path::PathBuf; -pub fn home_dir() -> Option { dirs_sys::home_dir() } +;;pub fn home_dir() -> Option { dirs_sys::home_dir() } -fn app_support_dir() -> Option { home_dir().map(|h| h.join("Library/Application Support")) } +;;fn app_support_dir() -> Option { home_dir().map(|h| h.join("Library/Application Support")) } -pub fn cache_dir() -> Option { home_dir().map(|h| h.join("Library/Caches")) } -pub fn config_dir() -> Option { app_support_dir() } -pub fn config_local_dir() -> Option { app_support_dir() } -pub fn data_dir() -> Option { app_support_dir() } -pub fn data_local_dir() -> Option { app_support_dir() } -pub fn preference_dir() -> Option { home_dir().map(|h| h.join("Library/Preferences")) } -pub fn executable_dir() -> Option { None } -pub fn runtime_dir() -> Option { None } -pub fn state_dir() -> Option { None } +;;pub fn cache_dir() -> Option { home_dir().map(|h| h.join("Library/Caches")) } +;;pub fn config_dir() -> Option { app_support_dir() } +;;pub fn config_local_dir() -> Option { app_support_dir() } +;;pub fn data_dir() -> Option { app_support_dir() } +;;pub fn data_local_dir() -> Option { app_support_dir() } +;;pub fn preference_dir() -> Option { home_dir().map(|h| h.join("Library/Preferences")) } +;;pub fn executable_dir() -> Option { None } +;;pub fn runtime_dir() -> Option { None } +;;pub fn state_dir() -> Option { None } -pub fn audio_dir() -> Option { home_dir().map(|h| h.join("Music")) } -pub fn desktop_dir() -> Option { home_dir().map(|h| h.join("Desktop")) } -pub fn document_dir() -> Option { home_dir().map(|h| h.join("Documents")) } -pub fn download_dir() -> Option { home_dir().map(|h| h.join("Downloads")) } -pub fn font_dir() -> Option { home_dir().map(|h| h.join("Library/Fonts")) } -pub fn picture_dir() -> Option { home_dir().map(|h| h.join("Pictures")) } -pub fn public_dir() -> Option { home_dir().map(|h| h.join("Public")) } -pub fn template_dir() -> Option { None } -pub fn video_dir() -> Option { home_dir().map(|h| h.join("Movies")) } +;;pub fn audio_dir() -> Option { home_dir().map(|h| h.join("Music")) } +;;pub fn desktop_dir() -> Option { home_dir().map(|h| h.join("Desktop")) } +;;pub fn document_dir() -> Option { home_dir().map(|h| h.join("Documents")) } +;;pub fn download_dir() -> Option { home_dir().map(|h| h.join("Downloads")) } +;;pub fn font_dir() -> Option { home_dir().map(|h| h.join("Library/Fonts")) } +;;pub fn picture_dir() -> Option { home_dir().map(|h| h.join("Pictures")) } +;;pub fn public_dir() -> Option { home_dir().map(|h| h.join("Public")) } +;;pub fn template_dir() -> Option { None } +;;pub fn video_dir() -> Option { home_dir().map(|h| h.join("Movies")) } diff --git a/src/dirs-win.lfe b/src/dirs-win.lfe index d241eb1..be133e8 100644 --- a/src/dirs-win.lfe +++ b/src/dirs-win.lfe @@ -1,28 +1,28 @@ (defmodule dirs-win (export all)) -extern crate dirs_sys; +;;extern crate dirs_sys; -use std::path::PathBuf; +;;use std::path::PathBuf; -pub fn home_dir() -> Option { dirs_sys::known_folder_profile() } +;;pub fn home_dir() -> Option { dirs_sys::known_folder_profile() } -pub fn cache_dir() -> Option { data_local_dir() } -pub fn config_dir() -> Option { dirs_sys::known_folder_roaming_app_data() } -pub fn config_local_dir() -> Option { dirs_sys::known_folder_local_app_data() } -pub fn data_dir() -> Option { dirs_sys::known_folder_roaming_app_data() } -pub fn data_local_dir() -> Option { dirs_sys::known_folder_local_app_data() } -pub fn executable_dir() -> Option { None } -pub fn preference_dir() -> Option { dirs_sys::known_folder_local_app_data() } -pub fn runtime_dir() -> Option { None } -pub fn state_dir() -> Option { None } +;;pub fn cache_dir() -> Option { data_local_dir() } +;;pub fn config_dir() -> Option { dirs_sys::known_folder_roaming_app_data() } +;;pub fn config_local_dir() -> Option { dirs_sys::known_folder_local_app_data() } +;;pub fn data_dir() -> Option { dirs_sys::known_folder_roaming_app_data() } +;;pub fn data_local_dir() -> Option { dirs_sys::known_folder_local_app_data() } +;;pub fn executable_dir() -> Option { None } +;;pub fn preference_dir() -> Option { dirs_sys::known_folder_local_app_data() } +;;pub fn runtime_dir() -> Option { None } +;;pub fn state_dir() -> Option { None } -pub fn audio_dir() -> Option { dirs_sys::known_folder_music() } -pub fn desktop_dir() -> Option { dirs_sys::known_folder_desktop() } -pub fn document_dir() -> Option { dirs_sys::known_folder_documents() } -pub fn download_dir() -> Option { dirs_sys::known_folder_downloads() } -pub fn font_dir() -> Option { None } -pub fn picture_dir() -> Option { dirs_sys::known_folder_pictures() } -pub fn public_dir() -> Option { dirs_sys::known_folder_public()} -pub fn template_dir() -> Option { dirs_sys::known_folder_templates() } -pub fn video_dir() -> Option { dirs_sys::known_folder_videos() } +;;pub fn audio_dir() -> Option { dirs_sys::known_folder_music() } +;;pub fn desktop_dir() -> Option { dirs_sys::known_folder_desktop() } +;;pub fn document_dir() -> Option { dirs_sys::known_folder_documents() } +;;pub fn download_dir() -> Option { dirs_sys::known_folder_downloads() } +;;pub fn font_dir() -> Option { None } +;;pub fn picture_dir() -> Option { dirs_sys::known_folder_pictures() } +;;pub fn public_dir() -> Option { dirs_sys::known_folder_public()} +;;pub fn template_dir() -> Option { dirs_sys::known_folder_templates() } +;;pub fn video_dir() -> Option { dirs_sys::known_folder_videos() } diff --git a/src/dirs.app.src b/src/dirs.app.src index 9ca7ebb..7bb1611 100644 --- a/src/dirs.app.src +++ b/src/dirs.app.src @@ -3,7 +3,6 @@ {vsn, "0.0.0"}, {registered, []}, {mod, {}}, - }, {applications, [ kernel, stdlib