Liking cljdoc? Tell your friends :D
Clojure only.

local-fs.core

File system utilities in clojure.

File system utilities in clojure.
raw docstring

*cwd*clj

Current working directory. This cannot be changed in the JVM. Changing this will only change the working directory for functions in this library.

Current working directory. This cannot be changed in the JVM.
Changing this will only change the working directory for functions
in this library.
sourceraw docstring

->copy-optionsclj

(->copy-options)
(->copy-options {:keys [replace-existing atomic-move copy-attributes
                        nofollow-links]})

Converts a hash-map of options into an array of CopyOption objects. | key | description | | -------------------|-------------| | :replace-existing| Adds StandardCopyOption/REPLACE_EXISTING to the array. Default: false | :atomic-move | Adds StandardCopyOption/ATOMIC_MOVE to the array. Default: false | :copy-attributes | Adds StandardCopyOption/COPY_ATTRIBUTES to the array. Default: false | :nofollow-links | Adds LinkOption/NOFOLLOW_LINKS to the array. Default: false

Converts a hash-map of options into an array of CopyOption objects.
| key                | description |
| -------------------|-------------|
| `:replace-existing`| Adds StandardCopyOption/REPLACE_EXISTING to the array. Default: `false`
| `:atomic-move`     | Adds StandardCopyOption/ATOMIC_MOVE to the array. Default: `false`
| `:copy-attributes` | Adds StandardCopyOption/COPY_ATTRIBUTES to the array. Default: `false`
| `:nofollow-links`  | Adds LinkOption/NOFOLLOW_LINKS to the array. Default: `false`
sourceraw docstring

->file-attributesclj

(->file-attributes)
(->file-attributes {:keys [posix-file-permissions]})

Converts a seq of file-attributes into an array of FileAttribute objects.

Converts a seq of file-attributes into an array of FileAttribute objects.
sourceraw docstring

(->link-options)
(->link-options {:keys [nofollow-links]})

Converts a hash-map of options into an array of LinkOption objects. | key | description | | -----------------|-------------| | :nofollow-links| Adds LinkOption/NOFOLLOW_LINKS to the array. Default: false

Converts a hash-map of options into an array of LinkOption objects.
| key              | description |
| -----------------|-------------|
| `:nofollow-links`| Adds LinkOption/NOFOLLOW_LINKS to the array. Default: `false`
sourceraw docstring

->posix-file-permissionsclj

(->posix-file-permissions permissions)
source

absoluteclj

(absolute path)

Return absolute file.

Return absolute file.
sourceraw docstring

absolute-pathclj

(absolute-path path)
source

absolute-path?clj

(absolute-path? path)
source

append-to-fileclj

(append-to-file path content)
source

as-fileclj

(as-file path & paths)
source

as-pathclj

(as-path path & paths)
source

base-nameclj

(base-name path)
(base-name path trim-ext)

Return the base name (final segment/file part) of a path. If optional trim-ext is a string and the path ends with that string, it is trimmed. If trim-ext is true, any extension is trimmed.

Return the base name (final segment/file part) of a `path`.
If optional `trim-ext` is a string and the `path` ends with that
string, it is trimmed.
If `trim-ext` is true, any extension is trimmed.
sourceraw docstring

canonical-pathclj

(canonical-path path)
source

chdirclj

(chdir path)

set!s the value of *cwd* to path. Only works inside of with-mutable-cwd

set!s the value of `*cwd*` to `path`. Only works inside of
[[with-mutable-cwd]]
sourceraw docstring

child-of?clj

(child-of? p c)

Takes two paths and checks to see if the first path is a parent of the second.

Takes two paths and checks to see if the first path is a parent
of the second.
sourceraw docstring

childrenclj

(children)
(children path)
source

chmodclj

(chmod mode path)

Change file permissions. Returns path. mode can be a permissions string in octal or symbolic format. Symbolic: any combination of r (readable) w (writable) and x (executable). It should be prefixed with + to set or - to unset. And optional prefix of u causes the permissions to be set for the owner only. Octal: a string of three octal digits representing user, group, and world permissions. The three bits of each digit signify read, write, and execute permissions (in order of significance). Note that group and world permissions must be equal. Examples:

(chmod "+x" "/tmp/foo") ; Sets executable for everyone
(chmod "u-wx" "/tmp/foo") ; Unsets owner write and executable
Change file permissions. Returns path.
`mode` can be a permissions string in octal or symbolic format.
Symbolic: any combination of `r` (readable) `w` (writable) and
`x` (executable). It should be prefixed with `+` to set or `-` to
unset. And optional prefix of `u` causes the permissions to be set
for the owner only.
Octal: a string of three octal digits representing user, group, and
world permissions. The three bits of each digit signify read, write,
and execute permissions (in order of significance). Note that group
and world permissions must be equal.
Examples:
```
(chmod "+x" "/tmp/foo") ; Sets executable for everyone
(chmod "u-wx" "/tmp/foo") ; Unsets owner write and executable
```
sourceraw docstring

copyclj

(copy from to)
(copy from to {:keys [replace-existing copy-attributes nofollow-links]})
source

copy+clj

(copy+ src dest)

Copy src to dest, create directories if needed.

Copy `src` to `dest`, create directories if needed.
sourceraw docstring

copy-dirclj

(copy-dir from to)

Copy a directory from from to to. If to already exists, copy the directory to a directory with the same name as from within the to directory.

Copy a directory from `from` to `to`. If `to` already exists, copy the directory
to a directory with the same name as `from` within the `to` directory.
sourceraw docstring

copy-dir-intoclj

(copy-dir-into from to)

Copy directory into another directory if destination already exists.

Copy directory into another directory if destination already exists.
sourceraw docstring

copy-file!clj

(copy-file! source dest)

Copy a file from source -> dest.

Copy a file from `source` -> `dest`.
sourceraw docstring

copy-files!clj

(copy-files! source-dir dest-dir)

Copy all files in source-dir to dest-dir. Overwrites existing files if last modified timestamp is not the same as that of the source file — see #11699 for more context.

Copy all files in `source-dir` to `dest-dir`. Overwrites existing files if last modified timestamp is not the same as
that of the source file — see #11699 for more context.
sourceraw docstring

copy-recursivelyclj

(copy-recursively from to)
(copy-recursively from
                  to
                  {:keys [replace-existing copy-attributes nofollow-links]})
source

createclj

(create f)

Create a new file.

Create a new file.
sourceraw docstring

create-dir-if-not-exists!clj

(create-dir-if-not-exists! path)

Self-explanatory. Create a directory with path if it does not already exist.

Self-explanatory. Create a directory with `path` if it does not already exist.
sourceraw docstring

create-directories!clj

(create-directories! path)
(create-directories! path {:keys [posix-file-permissions]})

Warning: Setting posix-file-permissions on create will not always result in the permissions you specify. This is a limitation of the implementation. To guarantee those permissions you should set the permissions as another step after creating the file.

Warning: Setting posix-file-permissions on create will not always
result in the permissions you specify. This is a limitation of the
implementation. To guarantee those permissions you should set the
permissions as another step after creating the file.
sourceraw docstring

create-directoryclj

(create-directory path)
(create-directory path {:keys [posix-file-permissions]})

Warning: Setting posix-file-permissions on create will not always result in the permissions you specify. This is a limitation of the implementation. To guarantee those permissions you should set the permissions as another step after creating the file.

Warning: Setting posix-file-permissions on create will not always
result in the permissions you specify. This is a limitation of the
implementation. To guarantee those permissions you should set the
permissions as another step after creating the file.
sourceraw docstring

create-fileclj

(create-file path)
(create-file path {:keys [posix-file-permissions content]})

Warning: Setting posix-file-permissions on create will not always result in the permissions you specify. This is a limitation of the implementation. To guarantee those permissions you should set the permissions as another step after creating the file.

Warning: Setting posix-file-permissions on create will not always
result in the permissions you specify. This is a limitation of the
implementation. To guarantee those permissions you should set the
permissions as another step after creating the file.
sourceraw docstring

(create-link link-path target-path)
source

(create-symlink link-path target-path)

Not allowing posix-file-permissions for file attributes since it is not supported on MacOS or Linux for this operation.

Not allowing posix-file-permissions for file attributes since it is not supported on MacOS
or Linux for this operation.
sourceraw docstring

create-temp-directoryclj

(create-temp-directory prefix)
(create-temp-directory prefix {:keys [posix-file-permissions]})

Warning: Setting posix-file-permissions on create will not always result in the permissions you specify. This is a limitation of the implementation. To guarantee those permissions you should set the permissions as another step after creating the file.

Warning: Setting posix-file-permissions on create will not always
result in the permissions you specify. This is a limitation of the
implementation. To guarantee those permissions you should set the
permissions as another step after creating the file.
sourceraw docstring

create-temp-fileclj

(create-temp-file prefix suffix)
(create-temp-file prefix suffix {:keys [posix-file-permissions content]})

Warning: Setting posix-file-permissions on create will not always result in the permissions you specify. This is a limitation of the implementation. To guarantee those permissions you should set the permissions as another step after creating the file.

Warning: Setting posix-file-permissions on create will not always
result in the permissions you specify. This is a limitation of the
implementation. To guarantee those permissions you should set the
permissions as another step after creating the file.
sourceraw docstring

creation-timeclj

(creation-time path)
(creation-time path {:keys [nofollow-links]})

Get the creation time of a file or directory.

Get the creation time of a file or directory.
sourceraw docstring

default-file-systemclj

source

deleteclj

(delete path)
source

delete-dirclj

(delete-dir root)

Delete a directory tree.

Delete a directory tree.
sourceraw docstring

delete-if-existsclj

(delete-if-exists path)
source

delete-recursivelyclj

(delete-recursively path)
(delete-recursively path {:keys [nofollow-links] :or {nofollow-links true}})
source

directory?clj

(directory? path)
(directory? path {:keys [nofollow-links]})
source

do-with-open-path-to-resourceclj

(do-with-open-path-to-resource resource f)

Impl for with-open-path-to-resource.

Impl for `with-open-path-to-resource`.
sourceraw docstring

ephemeral-dirclj

(ephemeral-dir prefix)
(ephemeral-dir prefix suffix)
(ephemeral-dir prefix suffix tries)

Create an ephemeral directory (will be deleted on JVM exit). Returns nil if dir could not be created even after n tries (default 10).

Create an ephemeral directory (will be deleted on JVM exit).
 Returns nil if dir could not be created even after n tries
(default 10).
sourceraw docstring

ephemeral-fileclj

(ephemeral-file prefix)
(ephemeral-file prefix suffix)
(ephemeral-file prefix suffix tries)

Create an ephemeral file (will be deleted on JVM exit). Returns nil if file could not be created even after n tries (default 10).

Create an ephemeral file (will be deleted on JVM exit).
 Returns nil if file could not be created even after n tries
(default 10).
sourceraw docstring

execclj

(exec & body)

Execute a shell command in the current directory

Execute a shell command in the current directory
sourceraw docstring

executable?clj

(executable? path)
source

exists?clj

(exists? path)
(exists? path {:keys [nofollow-links]})

Return true if path exists.

Return true if `path` exists.
sourceraw docstring

exists??clj

(exists?? path)

Does file at path actually exist?

TODO: exists?? is different with exists? why?

Does file at `path` actually exist?

TODO: exists?? is different with exists? why?
sourceraw docstring

expand-homeclj

(expand-home path)

If path begins with a tilde (~), expand the tilde to the value of the user.home system property. If the path begins with a tilde immediately followed by some characters, they are assumed to be a username. This is expanded to the path to that user's home directory. This is (naively) assumed to be a directory with the same name as the user relative to the parent of the current value of user.home.

If `path` begins with a tilde (`~`), expand the tilde to the value
of the `user.home` system property. If the `path` begins with a
tilde immediately followed by some characters, they are assumed to
be a username. This is expanded to the path to that user's home
directory. This is (naively) assumed to be a directory with the same
name as the user relative to the parent of the current value of
`user.home`.
sourceraw docstring

extensionclj

(extension path)

Return the extension part of a file.

Return the extension part of a file.
sourceraw docstring

extract-dir-from-jarclj

(extract-dir-from-jar jar-dir from to)

Takes the string path of a jar, a dir name inside that jar and a destination dir, and copies the from dir to the to dir.

Takes the string path of a jar, a dir name inside that jar and a destination
dir, and copies the from dir to the to dir.
sourceraw docstring

extract-env-from-archiveclj

(extract-env-from-archive archive-path path-component dest-dir)

Extract the entire contents of a file from a archive (such as a JAR).

Extract the entire contents of a file from a archive (such as a JAR).
sourceraw docstring

fileclj

(file path & paths)

If path is a period, replaces it with cwd and creates a new File object out of it and paths. Or, if the resulting File object does not constitute an absolute path, makes it absolutely by creating a new File object out of the paths and cwd.

If `path` is a period, replaces it with cwd and creates a new File object
out of it and `paths`. Or, if the resulting File object does not constitute
an absolute path, makes it absolutely by creating a new File object out of
the `paths` and cwd.
sourceraw docstring

file-exists-in-archive?clj

(file-exists-in-archive? archive-path & path-components)

True is a file exists in an archive.

True is a file exists in an archive.
sourceraw docstring

file-separatorclj

source

file-system-forclj

(file-system-for path)
source

file?clj

source

filenameclj

(filename path)
source

files-seqclj

(files-seq path)

Get a sequence of all files in path, presumably a directory or an archive of some sort (like a JAR).

Get a sequence of all files in `path`, presumably a directory or an archive of some sort (like a JAR).
sourceraw docstring

find-filesclj

(find-files path pattern)

Find files matching given pattern.

Find files matching given `pattern`.
sourceraw docstring

find-files*clj

(find-files* path pred)

Find files in path by pred.

Find files in `path` by `pred`.
sourceraw docstring

first-path-segmentclj

(first-path-segment path)
source

format-colorclj

(format-color color x)
(format-color color format-string & args)

Like format, but colorizes the output. color should be a symbol or keyword like green, red, yellow, blue, cyan, magenta, etc. See the entire list of avaliable colors here.

(format-color :red "Fatal error: %s" error-message)
Like `format`, but colorizes the output. `color` should be a symbol or keyword like `green`, `red`, `yellow`, `blue`,
`cyan`, `magenta`, etc. See the entire list of avaliable
colors [here](https://github.com/ibdknox/colorize/blob/master/src/colorize/core.clj).

    (format-color :red "Fatal error: %s" error-message)
sourceraw docstring

get-attributeclj

(get-attribute path attribute)
(get-attribute path attribute {:keys [nofollow-links]})
source

get-pathclj

(get-path & path-components)

Get a Path for a file or directory in the default (i.e., system) filesystem named by string path component(s). (get-path "/Users/cam/tservice/tservice/plugins") ;; -> #object[sun.nio.fs.UnixPath 0x4d378139 "/Users/cam/tservice/tservice/plugins"]

Get a `Path` for a file or directory in the default (i.e., system) filesystem named by string path component(s).
(get-path "/Users/cam/tservice/tservice/plugins")
;; -> #object[sun.nio.fs.UnixPath 0x4d378139 "/Users/cam/tservice/tservice/plugins"]
sourceraw docstring

get-posix-file-permissionsclj

(get-posix-file-permissions path)
(get-posix-file-permissions path {:keys [nofollow-links format]})

Get the file permissions of a file or directory.

Get the file permissions of a file or directory.
sourceraw docstring

globclj

(glob pattern)
(glob root pattern)

Returns files matching glob pattern.

Returns files matching glob pattern.
sourceraw docstring

hidden?clj

(hidden? path)
source

homeclj

(home)
(home user)

With no arguments, returns the current value of the user.home system property. If a user is passed, returns that user's home directory. It is naively assumed to be a directory with the same name as the user located relative to the parent of the current value of user.home.

With no arguments, returns the current value of the `user.home` system
property. If a `user` is passed, returns that user's home directory. It
is naively assumed to be a directory with the same name as the `user`
located relative to the parent of the current value of `user.home`.
sourceraw docstring

iterate-dirclj

(iterate-dir path)

Return a sequence [root dirs files], starting from path in depth-first order

Return a sequence `[root dirs files]`, starting from `path` in depth-first order
sourceraw docstring

join-pathsclj

(join-paths path & paths)

Joins one or more path segments into a single String path object.

Joins one or more path segments into a single String path object.
sourceraw docstring

last-access-timeclj

(last-access-time path)
(last-access-time path {:keys [nofollow-links]})

Get the last access time of a file or directory

Get the last access time of a file or directory
sourceraw docstring

last-modified-timeclj

(last-modified-time path)
(last-modified-time path {:keys [nofollow-links]})

Get the last modified time of a file or directory.

Get the last modified time of a file or directory.
sourceraw docstring

last-path-segmentclj

(last-path-segment path)
source

list-dirclj

(list-dir path)

List files and directories under path.

List files and directories under `path`.
sourceraw docstring

long-strclj

(long-str & strings)
source

lookup-groupclj

(lookup-group group-name)
(lookup-group group-name file-system)
source

lookup-group!clj

(lookup-group! group-name)
(lookup-group! group-name file-system)
source

lookup-userclj

(lookup-user user-name)
(lookup-user user-name file-system)
source

lookup-user!clj

(lookup-user! user-name)
(lookup-user! user-name file-system)
source

mkdirclj

(mkdir path)

Create a directory.

Create a directory.
sourceraw docstring

mkdirsclj

(mkdirs path)

Make directory tree.

Make directory tree.
sourceraw docstring

moveclj

(move from to)
(move from to {:keys [replace-existing atomic-move]})
source

nameclj

(name path)

Return the name part of a file.

Return the name part of a file.
sourceraw docstring

normalize-pathclj

(normalize-path path)
source

normalizedclj

(normalized path)

Return normalized (canonical) file.

Return normalized (canonical) file.
sourceraw docstring

ns-pathclj

(ns-path n)

Takes a namespace symbol and creates a path to it. Replaces hyphens with underscores. Assumes the path should be relative to cwd.

Takes a namespace symbol and creates a path to it. Replaces hyphens with
underscores. Assumes the path should be relative to cwd.
sourceraw docstring

parentclj

(parent path)

Return the parent path.

Return the parent path.
sourceraw docstring

parent-pathclj

(parent-path path)
source

parent-pathsclj

(parent-paths path)
source

parentsclj

(parents f)

Get all the parent directories of a path.

Get all the parent directories of a path.
sourceraw docstring

path-nsclj

(path-ns path)

Takes a path to a Clojure file and constructs a namespace symbol out of the path.

Takes a `path` to a Clojure file and constructs a namespace symbol
out of the path.
sourceraw docstring

read-all-attributesclj

(read-all-attributes path)
(read-all-attributes path {:keys [nofollow-links]})
source

read-attributesclj

(read-attributes path attributes)
(read-attributes path attributes {:keys [nofollow-links]})
source

readable?clj

(readable? path)
source

regular-file?clj

(regular-file? path)
(regular-file? path {:keys [nofollow-links]})
source

relative-path?clj

(relative-path? path)
source

renameclj

(rename old-path new-path)

Rename old-path to new-path. Only works on files.

Rename `old-path` to `new-path`. Only works on files.
sourceraw docstring

safe-copyclj

(safe-copy from to opts)
source

safe-renameclj

(safe-rename current-path new-name)
(safe-rename current-path new-name {:keys [replace-existing atomic-move]})
source

same-file?clj

(same-file? path1 path2)
source

set-attributeclj

(set-attribute path attribute value)
(set-attribute path attribute value {:keys [nofollow-links]})
source

set-creation-timeclj

(set-creation-time path time)
(set-creation-time path time {:keys [nofollow-links]})

Set the creation time of a file or directory.

Set the creation time of a file or directory.
sourceraw docstring

set-groupclj

(set-group path group-name)
(set-group path group-name {:keys [nofollow-links]})
source

set-last-access-timeclj

(set-last-access-time path time)
(set-last-access-time path time {:keys [nofollow-links]})

Set the last access time of a file or directory.

Set the last access time of a file or directory.
sourceraw docstring

set-last-modified-timeclj

(set-last-modified-time path time)
(set-last-modified-time path time {:keys [nofollow-links]})

Set the last modified time of a file or directory.

Set the last modified time of a file or directory.
sourceraw docstring

set-ownerclj

(set-owner path user-name)
(set-owner path user-name {:keys [nofollow-links]})
source

set-posix-file-permissionsclj

(set-posix-file-permissions path permissions)
(set-posix-file-permissions path permissions {:keys [nofollow-links]})
source

sizeclj

(size path)
source

slurp-file-from-archiveclj

(slurp-file-from-archive archive-path & path-components)

Read the entire contents of a file from a archive (such as a JAR).

Read the entire contents of a file from a archive (such as a JAR).
sourceraw docstring

splitclj

(split path)

Split path to components.

Split `path` to components.
sourceraw docstring

split-extclj

(split-ext path)

Returns a vector of [name extension].

Returns a vector of `[name extension]`.
sourceraw docstring

split-pathclj

(split-path path)
source

supported-file-attribute-viewsclj

(supported-file-attribute-views path)
source

symlink?clj

(symlink? path)
source

temp-dirclj

(temp-dir prefix)
(temp-dir prefix suffix)
(temp-dir prefix suffix tries)

Create a temporary directory. Returns nil if dir could not be created even after n tries (default 10).

Create a temporary directory. Returns nil if dir could not be created
even after n tries (default 10).
sourceraw docstring

temp-fileclj

(temp-file prefix)
(temp-file prefix suffix)
(temp-file prefix suffix tries)

Create a temporary file. Returns nil if file could not be created even after n tries (default 10).

Create a temporary file. Returns nil if file could not be created
even after n tries (default 10).
sourceraw docstring

temp-nameclj

(temp-name prefix)
(temp-name prefix suffix)

Create a temporary file name like what is created for temp-file and temp-dir.

Create a temporary file name like what is created for [[temp-file]]
and [[temp-dir]].
sourceraw docstring

tmpdirclj

(tmpdir)

The temporary file directory looked up via the java.io.tmpdir system property. Does not create a temporary directory.

The temporary file directory looked up via the `java.io.tmpdir`
system property. Does not create a temporary directory.
sourceraw docstring

touchclj

(touch path & [time])

Set file modification time (default to now). Returns path.

Set file modification time (default to now). Returns `path`.
sourceraw docstring

unix-rootclj

The root of a unix system is /, nil on Windows

The root of a unix system is `/`, `nil` on Windows
sourceraw docstring

unzip-fileclj

(unzip-file zip-file to-dir)
source

varargscljmacro

(varargs klass)
(varargs klass xs)

Make a properly-tagged Java interop varargs argument. This is basically the same as into-array but properly tags the result. (u/varargs String) (u/varargs String ["A" "B"])

Make a properly-tagged Java interop varargs argument. This is basically the same as `into-array` but properly tags
the result.
  (u/varargs String)
  (u/varargs String ["A" "B"])
sourceraw docstring

walkclj

(walk func path)

Lazily walk depth-first over the directory structure starting at path calling func with three arguments [root dirs files]. Returns a sequence of the results.

Lazily walk depth-first over the directory structure starting at
`path` calling `func` with three arguments `[root dirs files]`.
Returns a sequence of the results.
sourceraw docstring

whichclj

(which bin-name)
source

with-cwdcljmacro

(with-cwd cwd & body)

Execute body with a changed working directory.

Execute `body` with a changed working directory.
sourceraw docstring

with-mutable-cwdcljmacro

(with-mutable-cwd & body)

Execute the body in a binding with *cwd* bound to *cwd*. This allows you to change *cwd* with set!.

Execute the `body` in a binding with `*cwd*` bound to `*cwd*`.
This allows you to change `*cwd*` with `set!`.
sourceraw docstring

with-open-path-to-resourcecljmacro

(with-open-path-to-resource [path-binding resource-filename-str] & body)

Execute body with an Path to a resource file or directory (i.e. a file in the project resources/ directory, or inside the uberjar), cleaning up when finished. Throws a FileNotFoundException if the resource does not exist; be sure to check with io/resource or similar before calling this. (with-open-path-to-resouce [path "modules"] ...)

Execute `body` with an Path to a resource file or directory (i.e. a file in the project `resources/` directory, or
inside the uberjar), cleaning up when finished.
Throws a FileNotFoundException if the resource does not exist; be sure to check with `io/resource` or similar before
calling this.
  (with-open-path-to-resouce [path "modules"]
     ...)
sourceraw docstring

with-temp-directorycljmacro

(with-temp-directory [path-sym] & body)
source

with-temp-directory*clj

(with-temp-directory* f)
source

with-temp-filecljmacro

(with-temp-file [dir-sym path-sym] & body)
source

with-temp-file*clj

(with-temp-file* f)
source

without-extensionclj

(without-extension path)
source

writable?clj

(writable? path)
source

zip-filesclj

(zip-files from-files to-filepath)

Make a zip file with the from-files.

Make a zip file with the from-files.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close