Lines Matching defs:length
1068 * path.length
1069 * The length of the path in characters, if specified as
1083 * and path.length will be 0.
1111 Py_ssize_t length;
1141 Py_ssize_t length = 0;
1222 wide = PyUnicode_AsUnicodeAndSize(o, &length);
1225 wide = PyUnicode_AsWideCharString(o, &length);
1230 if (length > 32767) {
1234 if (wcslen(wide) != length) {
1304 length = PyBytes_GET_SIZE(bytes);
1306 if ((size_t)length != strlen(narrow)) {
1314 length
1323 wide = PyUnicode_AsUnicodeAndSize(wo, &length);
1326 wide = PyUnicode_AsWideCharString(wo, &length);
1332 if (length > 32767) {
1336 if (wcslen(wide) != length) {
1363 path->length = length;
4459 buflen = Py_MAX(path->length, MAX_PATH);
7761 // Call getgroups with length 0 to get the actual number of groups
8711 ssize_t length;
8720 length = readlinkat(dir_fd, path->narrow, buffer, MAXPATHLEN);
8726 length = readlink(path->narrow, buffer, MAXPATHLEN);
8736 if (length < 0) {
8739 buffer[length] = '\0';
8742 return PyUnicode_DecodeFSDefaultAndSize(buffer, length);
8744 return PyBytes_FromStringAndSize(buffer, length);
8821 size_t length = wcsnlen_s(path, MAX_PATH);
8822 if (length == MAX_PATH) {
8827 for(ptr = path + length; ptr != path; ptr--) {
9524 length: Py_off_t
9533 os_lockf_impl(PyObject *module, int fd, int command, Py_off_t length)
9538 if (PySys_Audit("os.lockf", "iiL", fd, command, length) < 0) {
9543 res = lockf(fd, command, length);
9602 length: Py_ssize_t
9609 os_read_impl(PyObject *module, int fd, Py_ssize_t length)
9615 if (length < 0) {
9620 length = Py_MIN(length, _PY_READ_MAX);
9622 buffer = PyBytes_FromStringAndSize((char *)NULL, length);
9626 n = _Py_read(fd, PyBytes_AS_STRING(buffer), length);
9632 if (n != length)
9760 length: Py_ssize_t
9766 Read length bytes from file descriptor fd, starting at offset bytes from
9771 os_pread_impl(PyObject *module, int fd, Py_ssize_t length, Py_off_t offset)
9778 if (length < 0) {
9782 buffer = PyBytes_FromStringAndSize((char *)NULL, length);
9789 n = pread(fd, PyBytes_AS_STRING(buffer), length, offset);
9798 if (n != length)
10872 length: Py_off_t
10875 Truncate a file, specified by file descriptor, to a specific length.
10879 os_ftruncate_impl(PyObject *module, int fd, Py_off_t length)
10885 if (PySys_Audit("os.truncate", "in", fd, length) < 0) {
10893 result = _chsize_s(fd, length);
10895 result = ftruncate(fd, length);
10912 length: Py_off_t
10914 Truncate a file, specified by path, to a specific length.
10921 os_truncate_impl(PyObject *module, path_t *path, Py_off_t length)
10930 return os_ftruncate_impl(module, path->fd, length);
10932 if (PySys_Audit("os.truncate", "On", path->object, length) < 0) {
10943 result = _chsize_s(fd, length);
10949 result = truncate(path->narrow, length);
10976 length: Py_off_t
10982 starting at offset bytes from the beginning and continuing for length bytes.
10987 Py_off_t length)
10995 result = posix_fallocate(fd, offset, length);
11017 length: Py_off_t
11026 offset and continuing for length bytes.
11034 Py_off_t length, int advice)
11042 result = posix_fadvise(fd, offset, length, advice);
11564 dir_path = PyMem_New(wchar_t, path->length + 1);
11569 wcscpy_s(dir_path, path->length + 1, path->wide);
13109 ssize_t length;
13125 length = flistxattr(path->fd, buffer, buffer_size);
13127 length = listxattr(name, buffer, buffer_size);
13129 length = llistxattr(name, buffer, buffer_size);
13132 if (length < 0) {
13147 end = buffer + length;