filesys.h 2.7 KB

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