filesys.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* classes: h_files */
  2. #ifndef SCM_FILESYS_H
  3. #define SCM_FILESYS_H
  4. /* Copyright (C) 1995,1997,1998,1999,2000,2001, 2006, 2008 Free Software Foundation, Inc.
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public License
  8. * as published by the Free Software Foundation; either version 3 of
  9. * the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful, but
  12. * WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  19. * 02110-1301 USA
  20. */
  21. #include "libguile/__scm.h"
  22. SCM_API scm_t_bits scm_tc16_dir;
  23. #define SCM_DIR_FLAG_OPEN (1L << 16)
  24. #define SCM_DIRP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_dir))
  25. #define SCM_DIR_OPEN_P(x) (SCM_CELL_WORD_0 (x) & SCM_DIR_FLAG_OPEN)
  26. SCM_API SCM scm_chown (SCM object, SCM owner, SCM group);
  27. SCM_API SCM scm_chmod (SCM object, SCM mode);
  28. SCM_API SCM scm_umask (SCM mode);
  29. SCM_API SCM scm_open_fdes (SCM path, SCM flags, SCM mode);
  30. SCM_API SCM scm_open (SCM path, SCM flags, SCM mode);
  31. SCM_API SCM scm_close (SCM fd_or_port);
  32. SCM_API SCM scm_close_fdes (SCM fd);
  33. SCM_API SCM scm_stat (SCM object, SCM exception_on_error);
  34. SCM_API SCM scm_link (SCM oldpath, SCM newpath);
  35. SCM_API SCM scm_rename (SCM oldname, SCM newname);
  36. SCM_API SCM scm_delete_file (SCM str);
  37. SCM_API SCM scm_mkdir (SCM path, SCM mode);
  38. SCM_API SCM scm_rmdir (SCM path);
  39. SCM_API SCM scm_directory_stream_p (SCM obj);
  40. SCM_API SCM scm_opendir (SCM dirname);
  41. SCM_API SCM scm_readdir (SCM port);
  42. SCM_API SCM scm_rewinddir (SCM port);
  43. SCM_API SCM scm_closedir (SCM port);
  44. SCM_API SCM scm_chdir (SCM str);
  45. SCM_API SCM scm_getcwd (void);
  46. SCM_API SCM scm_select (SCM reads, SCM writes, SCM excepts, SCM secs, SCM msecs);
  47. SCM_API SCM scm_fcntl (SCM object, SCM cmd, SCM value);
  48. SCM_API SCM scm_fsync (SCM object);
  49. SCM_API SCM scm_symlink (SCM oldpath, SCM newpath);
  50. SCM_API SCM scm_readlink (SCM path);
  51. SCM_API SCM scm_lstat (SCM str);
  52. SCM_API SCM scm_copy_file (SCM oldfile, SCM newfile);
  53. SCM_API SCM scm_dirname (SCM filename);
  54. SCM_API SCM scm_basename (SCM filename, SCM suffix);
  55. SCM_API SCM scm_canonicalize_path (SCM path);
  56. SCM_INTERNAL void scm_init_filesys (void);
  57. #endif /* SCM_FILESYS_H */
  58. /*
  59. Local Variables:
  60. c-file-style: "gnu"
  61. End:
  62. */