GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ssh2-python/ssh2/fileinfo.pyx at master · bluestingray/ssh2-python

Expand file tree

/

fileinfo.pyx

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
86 lines (64 loc) · 2.42 KB
/

fileinfo.pyx

Copy path

File metadata and controls

86 lines (64 loc) · 2.42 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# This file is part of ssh2-python.
# Copyright (C) 2017 Panos Kittenis
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation, version 2.1.
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
"""Available only when built on libssh2 >= ``1.7``"""
from libc.stdlib cimport malloc, free
cimport c_ssh2
IF EMBEDDED_LIB:
cdef class FileInfo:
"""Representation of stat structure - libssh2 >= 1.7"""
def __cinit__(self):
with nogil:
self._stat = <c_ssh2.libssh2_struct_stat *>malloc(
sizeof(c_ssh2.libssh2_struct_stat))
if self._stat is NULL:
with gil:
raise MemoryError
def __dealloc__(self):
free(self._stat)
@property
def st_size(self):
return self._stat.st_size
@property
def st_mode(self):
return self._stat.st_mode
IF UNAME_SYSNAME != "Windows":
@property
def st_ino(self):
return self._stat.st_ino
@property
def st_nlink(self):
return self._stat.st_nlink
@property
def st_uid(self):
return self._stat.st_uid
@property
def st_gid(self):
return self._stat.st_gid
@property
def st_rdev(self):
return self._stat.st_rdev
@property
def st_blksize(self):
return self._stat.st_blksize
@property
def st_blocks(self):
return self._stat.st_blocks
@property
def st_atime(self):
return self._stat.st_atime
@property
def st_mtime(self):
return self._stat.st_mtime
@property
def st_ctime(self):
return self._stat.st_ctime
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.