#ifndef SCM_FILESYS_INTERNAL_H #define SCM_FILESYS_INTERNAL_H /* Copyright 1995,1997-2001,2006,2008-2011,2013,2018,2021,2025 Free Software Foundation, Inc. This file is part of Guile. Guile is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Guile is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with Guile. If not, see . */ #include #include #include #define SCM_DIR_FLAG_OPEN (1L << 16) struct scm_directory { scm_t_bits tag_and_flags; DIR *ds; scm_i_pthread_mutex_t mutex; }; static inline int scm_is_directory (SCM x) { return SCM_HAS_TYP16 (x, scm_tc16_directory); } static inline struct scm_directory* scm_to_directory (SCM x) { if (!scm_is_directory (x)) abort (); return (struct scm_directory*) SCM_UNPACK_POINTER (x); } static inline SCM scm_from_directory (struct scm_directory *dir) { return SCM_PACK_POINTER (dir); } SCM_INTERNAL SCM scm_copy_file2 (SCM oldfile, SCM newfile, SCM rest); SCM_INTERNAL SCM scm_i_relativize_path (SCM path, SCM in_path); SCM_INTERNAL int scm_i_print_directory (SCM exp, SCM port, scm_print_state *pstate); SCM_INTERNAL void scm_i_finalize_directory (struct scm_thread*, SCM); SCM_INTERNAL void scm_init_filesys (void); #endif /* SCM_FILESYS_INTERNAL_H */