<commit_before>%
% (c) The AQUA Project, Glasgow University, 1994-1997
%
\section[Directory]{Directory interface}

A directory contains a series of entries, each of which is a named
reference to a file system object (file, directory etc.).  Some
entries may be hidden, inaccessible, or have some administrative
function (e.g. "." or ".." under POSIX), but in this standard all such
entries are considered to form part of the directory contents.
Entries in sub-directories are not, however, considered to form part
of the directory contents.

Each file system object is referenced by a {\em path}.  There is
normally at least one absolute path to each file system object.  In
some operating systems, it may also be possible to have paths which
are relative to the current directory.

\begin{code}
{-# OPTIONS -#include <sys/stat.h> -#include <dirent.h> #-}
module Directory 
   ( 
    Permissions(Permissions),

    createDirectory, 
    removeDirectory, 
    renameDirectory, 
    getDirectoryContents,
    getCurrentDirectory, 
    setCurrentDirectory,

    removeFile, 
    renameFile, 
<commit_msg>[project @ 1998-05-31 15:25:02 by sof] Bring prototypes of cbits/ stubs into scope when compiling .hc file<commit_after>%
% (c) The AQUA Project, Glasgow University, 1994-1997
%
\section[Directory]{Directory interface}

A directory contains a series of entries, each of which is a named
reference to a file system object (file, directory etc.).  Some
entries may be hidden, inaccessible, or have some administrative
function (e.g. "." or ".." under POSIX), but in this standard all such
entries are considered to form part of the directory contents.
Entries in sub-directories are not, however, considered to form part
of the directory contents.

Each file system object is referenced by a {\em path}.  There is
normally at least one absolute path to each file system object.  In
some operating systems, it may also be possible to have paths which
are relative to the current directory.

\begin{code}
{-# OPTIONS -#include <sys/stat.h> -#include <dirent.h> -#include "cbits/stgio.h" #-}
module Directory 
   ( 
    Permissions(Permissions),

    createDirectory, 
    removeDirectory, 
    renameDirectory, 
    getDirectoryContents,
    getCurrentDirectory, 
    setCurrentDirectory,

    removeFile, 
    renameFile, 

{'fraction_non_alphanumeric': 0.07539853511417492, 'fraction_numerical': 0.012925463162429988, 'mean_word_length': 3.9404255319148938, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4521077', 'n_tokens_mistral': 671, 'n_tokens_neox': 612, 'n_words': 289}