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