package sklearn

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Utils.PathSource

Sourcetype t
Sourceval of_pyobject : Py.Object.t -> t
Sourceval to_pyobject : t -> Py.Object.t
Sourceval create : ?kwargs:(string * Py.Object.t) list -> Py.Object.t list -> t

PurePath subclass that can make system calls.

Path represents a filesystem path but unlike PurePath, also offers methods to do system calls on path objects. Depending on your system, instantiating a Path will return either a PosixPath or a WindowsPath object. You can also instantiate a PosixPath or WindowsPath directly, but cannot instantiate a WindowsPath on a POSIX system or vice versa.

Sourceval absolute : t -> Py.Object.t

Return an absolute version of this path. This function works even if the path doesn't point to anything.

No normalization is done, i.e. all '.' and '..' will be kept along. Use resolve() to get the canonical path to a file.

Sourceval as_posix : t -> Py.Object.t

Return the string representation of the path with forward (/) slashes.

Sourceval as_uri : t -> Py.Object.t

Return the path as a 'file' URI.

Sourceval chmod : mode:Py.Object.t -> t -> Py.Object.t

Change the permissions of the path, like os.chmod().

Sourceval cwd : t -> Py.Object.t

Return a new path pointing to the current working directory (as returned by os.getcwd()).

Sourceval exists : t -> Py.Object.t

Whether this path exists.

Sourceval expanduser : t -> Py.Object.t

Return a new path with expanded ~ and ~user constructs (as returned by os.path.expanduser)

Sourceval glob : pattern:Py.Object.t -> t -> Py.Object.t

Iterate over this subtree and yield all existing files (of any kind, including directories) matching the given relative pattern.

Sourceval group : t -> Py.Object.t

Return the group name of the file gid.

Sourceval home : t -> Py.Object.t

Return a new path pointing to the user's home directory (as returned by os.path.expanduser('~')).

Sourceval is_absolute : t -> Py.Object.t

True if the path is absolute (has both a root and, if applicable, a drive).

Sourceval is_block_device : t -> Py.Object.t

Whether this path is a block device.

Sourceval is_char_device : t -> Py.Object.t

Whether this path is a character device.

Sourceval is_dir : t -> Py.Object.t

Whether this path is a directory.

Sourceval is_fifo : t -> Py.Object.t

Whether this path is a FIFO.

Sourceval is_file : t -> Py.Object.t

Whether this path is a regular file (also True for symlinks pointing to regular files).

Sourceval is_mount : t -> Py.Object.t

Check if this path is a POSIX mount point

Sourceval is_reserved : t -> Py.Object.t

Return True if the path contains one of the special names reserved by the system, if any.

Sourceval is_socket : t -> Py.Object.t

Whether this path is a socket.

Whether this path is a symbolic link.

Sourceval iterdir : t -> Py.Object.t

Iterate over the files in this directory. Does not yield any result for the special paths '.' and '..'.

Sourceval joinpath : Py.Object.t list -> t -> Py.Object.t

Combine this path with one or several arguments, and return a new path representing either a subpath (if all arguments are relative paths) or a totally different path (if one of the arguments is anchored).

Sourceval lchmod : mode:Py.Object.t -> t -> Py.Object.t

Like chmod(), except if the path points to a symlink, the symlink's permissions are changed, rather than its target's.

Sourceval lstat : t -> Py.Object.t

Like stat(), except if the path points to a symlink, the symlink's status information is returned, rather than its target's.

Sourceval match_ : path_pattern:Py.Object.t -> t -> Py.Object.t

Return True if this path matches the given pattern.

Sourceval mkdir : ?mode:Py.Object.t -> ?parents:Py.Object.t -> ?exist_ok:Py.Object.t -> t -> Py.Object.t

Create a new directory at this given path.

Sourceval open_ : ?mode:Py.Object.t -> ?buffering:Py.Object.t -> ?encoding:Py.Object.t -> ?errors:Py.Object.t -> ?newline:Py.Object.t -> t -> Py.Object.t

Open the file pointed by this path and return a file object, as the built-in open() function does.

Sourceval owner : t -> Py.Object.t

Return the login name of the file owner.

Sourceval read_bytes : t -> Py.Object.t

Open the file in bytes mode, read it, and close the file.

Sourceval read_text : ?encoding:Py.Object.t -> ?errors:Py.Object.t -> t -> Py.Object.t

Open the file in text mode, read it, and close the file.

Sourceval relative_to : Py.Object.t list -> t -> Py.Object.t

Return the relative path to another path identified by the passed arguments. If the operation is not possible (because this is not a subpath of the other path), raise ValueError.

Sourceval rename : target:Py.Object.t -> t -> Py.Object.t

Rename this path to the given path.

Sourceval replace : target:Py.Object.t -> t -> Py.Object.t

Rename this path to the given path, clobbering the existing destination if it exists.

Sourceval resolve : ?strict:Py.Object.t -> t -> Py.Object.t

Make the path absolute, resolving all symlinks on the way and also normalizing it (for example turning slashes into backslashes under Windows).

Sourceval rglob : pattern:Py.Object.t -> t -> Py.Object.t

Recursively yield all existing files (of any kind, including directories) matching the given relative pattern, anywhere in this subtree.

Sourceval rmdir : t -> Py.Object.t

Remove this directory. The directory must be empty.

Sourceval samefile : other_path:Py.Object.t -> t -> Py.Object.t

Return whether other_path is the same or not as this file (as returned by os.path.samefile()).

Sourceval stat : t -> Py.Object.t

Return the result of the stat() system call on this path, like os.stat() does.

Make this path a symlink pointing to the given path. Note the order of arguments (self, target) is the reverse of os.symlink's.

Sourceval touch : ?mode:Py.Object.t -> ?exist_ok:Py.Object.t -> t -> Py.Object.t

Create this file with the given access mode, if it doesn't exist.

Remove this file or link. If the path is a directory, use rmdir() instead.

Sourceval with_name : name:Py.Object.t -> t -> Py.Object.t

Return a new path with the file name changed.

Sourceval with_suffix : suffix:Py.Object.t -> t -> Py.Object.t

Return a new path with the file suffix changed. If the path has no suffix, add given suffix. If the given suffix is an empty string, remove the suffix from the path.

Sourceval write_bytes : data:Py.Object.t -> t -> Py.Object.t

Open the file in bytes mode, write to it, and close the file.

Sourceval write_text : ?encoding:Py.Object.t -> ?errors:Py.Object.t -> data:Py.Object.t -> t -> Py.Object.t

Open the file in text mode, write to it, and close the file.

Sourceval to_string : t -> string

Print the object to a human-readable representation.

Sourceval show : t -> string

Print the object to a human-readable representation.

Sourceval pp : Format.formatter -> t -> unit

Pretty-print the object to a formatter.

OCaml

Innovation. Community. Security.