sftp_server_directory.h File Reference

Directory operations. More...

#include "sftp/sftp_server.h"

Go to the source code of this file.

Functions

error_t sftpServerCreateDir (SftpServerSession *session, const SshString *path, const SftpFileAttrs *attributes)
 Create a directory. More...
 
error_t sftpServerRemoveDir (SftpServerSession *session, const SshString *path)
 Remove a directory. More...
 
error_t sftpServerOpenDir (SftpServerSession *session, const SshString *path, uint32_t *handle)
 Open a directory. More...
 
error_t sftpServerReadDir (SftpServerSession *session, const SshBinaryString *handle, SftpName *name)
 Read an entry from the specified directory. More...
 
error_t sftpServerCloseDir (SftpServerSession *session, const SshBinaryString *handle)
 Close a directory. More...
 
SftpFileObjectsftpServerFindDir (SftpServerSession *session, const SshBinaryString *handle)
 Find the directory object that matches a given handle. More...
 

Detailed Description

Directory operations.

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2019-2024 Oryx Embedded SARL. All rights reserved.

This file is part of CycloneSSH Open.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.0

Definition in file sftp_server_directory.h.

Function Documentation

◆ sftpServerCloseDir()

error_t sftpServerCloseDir ( SftpServerSession session,
const SshBinaryString handle 
)

Close a directory.

Parameters
[in]sessionHandle referencing an SFTP session
[in]handleOpaque value that identifies the directory
Returns
Error code

Definition at line 345 of file sftp_server_directory.c.

◆ sftpServerCreateDir()

error_t sftpServerCreateDir ( SftpServerSession session,
const SshString path,
const SftpFileAttrs attributes 
)

Create a directory.

Parameters
[in]sessionHandle referencing an SFTP session
[in]pathDirectory path
[in]attributesModifications to be made to its attributes
Returns
Error code

Definition at line 54 of file sftp_server_directory.c.

◆ sftpServerFindDir()

SftpFileObject* sftpServerFindDir ( SftpServerSession session,
const SshBinaryString handle 
)

Find the directory object that matches a given handle.

Parameters
[in]sessionHandle referencing an SFTP session
[in]handleOpaque variable-length string
Returns
Pointer to the matching directory object

Definition at line 386 of file sftp_server_directory.c.

◆ sftpServerOpenDir()

error_t sftpServerOpenDir ( SftpServerSession session,
const SshString path,
uint32_t *  handle 
)

Open a directory.

Parameters
[in]sessionHandle referencing an SFTP session
[in]pathPath name of the directory to be listed
[out]handleOpaque value that identifies the directory
Returns
Error code

Definition at line 131 of file sftp_server_directory.c.

◆ sftpServerReadDir()

error_t sftpServerReadDir ( SftpServerSession session,
const SshBinaryString handle,
SftpName name 
)

Read an entry from the specified directory.

Parameters
[in]sessionHandle referencing an SFTP session
[in]handleOpaque value that identifies the directory
[out]nameFile name being returned
Returns
Error code

Definition at line 223 of file sftp_server_directory.c.

◆ sftpServerRemoveDir()

error_t sftpServerRemoveDir ( SftpServerSession session,
const SshString path 
)

Remove a directory.

Parameters
[in]sessionHandle referencing an SFTP session
[in]pathDirectory path
Returns
Error code

Definition at line 92 of file sftp_server_directory.c.