filesys.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* classes: h_files */
  2. #ifndef SCM_FILESYS_H
  3. #define SCM_FILESYS_H
  4. /* Copyright (C) 1995,1997,1998,1999,2000,2001, 2006 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
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but 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 02110-1301 USA
  19. */
  20. #include "libguile/__scm.h"
  21. SCM_API scm_t_bits scm_tc16_dir;
  22. #define SCM_DIR_FLAG_OPEN (1L << 16)
  23. #define SCM_DIRP(x) (!SCM_IMP (x) && (SCM_TYP16 (x) == scm_tc16_dir))
  24. #define SCM_DIR_OPEN_P(x) (SCM_CELL_WORD_0 (x) & SCM_DIR_FLAG_OPEN)
  25. SCM_API SCM scm_chown (SCM object, SCM owner, SCM group);
  26. SCM_API SCM scm_chmod (SCM object, SCM mode);
  27. SCM_API SCM scm_umask (SCM mode);
  28. SCM_API SCM scm_open_fdes (SCM path, SCM flags, SCM mode);
  29. SCM_API SCM scm_open (SCM path, SCM flags, SCM mode);
  30. SCM_API SCM scm_close (SCM fd_or_port);
  31. SCM_API SCM scm_close_fdes (SCM fd);
  32. SCM_API SCM scm_stat (SCM object);
  33. SCM_API SCM scm_link (SCM oldpath, SCM newpath);
  34. SCM_API SCM scm_rename (SCM oldname, SCM newname);
  35. SCM_API SCM scm_delete_file (SCM str);
  36. SCM_API SCM scm_mkdir (SCM path, SCM mode);
  37. SCM_API SCM scm_rmdir (SCM path);
  38. SCM_API SCM scm_directory_stream_p (SCM obj);
  39. SCM_API SCM scm_opendir (SCM dirname);
  40. SCM_API SCM scm_readdir (SCM port);
  41. SCM_API SCM scm_rewinddir (SCM port);
  42. SCM_API SCM scm_closedir (SCM port);
  43. SCM_API SCM scm_chdir (SCM str);
  44. SCM_API SCM scm_getcwd (void);
  45. SCM_API SCM scm_select (SCM reads, SCM writes, SCM excepts, SCM secs, SCM msecs);
  46. SCM_API SCM scm_fcntl (SCM object, SCM cmd, SCM value);
  47. SCM_API SCM scm_fsync (SCM object);
  48. SCM_API SCM scm_symlink (SCM oldpath, SCM newpath);
  49. SCM_API SCM scm_readlink (SCM path);
  50. SCM_API SCM scm_lstat (SCM str);
  51. SCM_API SCM scm_copy_file (SCM oldfile, SCM newfile);
  52. SCM_API SCM scm_dirname (SCM filename);
  53. SCM_API SCM scm_basename (SCM filename, SCM suffix);
  54. SCM_API void scm_init_filesys (void);
  55. #endif /* SCM_FILESYS_H */
  56. /*
  57. Local Variables:
  58. c-file-style: "gnu"
  59. End:
  60. */