Steamworks 문서
ISteamRemoteStorage 인터페이스
Provides functions for reading, writing, and accessing files which can be stored remotely in the Steam Cloud.

See Steam Cloud for more information.

멤버 함수

Member functions for ISteamRemoteStorage are called through the global accessor function SteamRemoteStorage().

BeginFileWriteBatch

bool BeginFileWriteBatch( );

Use this along with EndFileWriteBatch to wrap a set of local file writes/deletes that should be considered part of one single state change. For example, if saving game progress requires updating both savegame1.dat and maxprogress.dat, wrap those operations with calls to BeginFileWriteBatch and EndFileWriteBatch.

These functions provide a hint to Steam which will help it manage the app's Cloud files. Using these functions is optional, however it will provide better reliability.

Note that the functions may be used whether the writes are done using the ISteamRemoteStorage API, or done directly to local disk (where AutoCloud is used).

반환값: bool
? if the write batch was begun, false if there was a batch already in progress.

CommitPublishedFileUpdate

SteamAPICall_t CommitPublishedFileUpdate( PublishedFileUpdateHandle_t updateHandle );
이름종류설명
updateHandlePublishedFileUpdateHandle_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

반환값: SteamAPICall_t to be used with a RemoteStorageUpdatePublishedFileResult_t call result.

CreatePublishedFileUpdateRequest

PublishedFileUpdateHandle_t CreatePublishedFileUpdateRequest( PublishedFileId_t unPublishedFileId );
이름유형설명
unPublishedFileIdPublishedFileId_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

반환값: PublishedFileUpdateHandle_t

DeletePublishedFile

SteamAPICall_t DeletePublishedFile( PublishedFileId_t unPublishedFileId );
이름유형설명
unPublishedFileIdPublishedFileId_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

반환값: SteamAPICall_t to be used with a RemoteStorageDeletePublishedFileResult_t call result.

EndFileWriteBatch

bool EndFileWriteBatch( );

Use this along with BeginFileWriteBatch - see that documentation for more details.

반환값: bool
if the write batch was ended, false if there was no batch already in progress.

EnumeratePublishedFilesByUserAction

SteamAPICall_t EnumeratePublishedFilesByUserAction( EWorkshopFileAction eAction, uint32 unStartIndex );
이름유형Description
eActionEWorkshopFileAction
unStartIndexuint32

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

반환값: SteamAPICall_t to be used with a RemoteStorageEnumeratePublishedFilesByUserActionResult_t call result.

EnumeratePublishedWorkshopFiles

SteamAPICall_t EnumeratePublishedWorkshopFiles( EWorkshopEnumerationType eEnumerationType, uint32 unStartIndex, uint32 unCount, uint32 unDays, SteamParamStringArray_t *pTags, SteamParamStringArray_t *pUserTags );
이름유형설명
eEnumerationTypeEWorkshopEnumerationType
unStartIndexuint32
unCountuint32
unDaysuint32
pTagsSteamParamStringArray_t *
pUserTagsSteamParamStringArray_t *

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

반환값: SteamAPICall_t to be used with a RemoteStorageEnumerateWorkshopFilesResult_t call result.

EnumerateUserPublishedFiles

SteamAPICall_t EnumerateUserPublishedFiles( uint32 unStartIndex );
이름유형설명
unStartIndexuint32

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

반환값: SteamAPICall_t to be used with a RemoteStorageEnumerateUserPublishedFilesResult_t call result.

EnumerateUserSharedWorkshopFiles

SteamAPICall_t EnumerateUserSharedWorkshopFiles( CSteamID steamId, uint32 unStartIndex, SteamParamStringArray_t *pRequiredTags, SteamParamStringArray_t *pExcludedTags );
이름유형설명
steamIdCSteamID
unStartIndexuint32
pRequiredTagsSteamParamStringArray_t *
pExcludedTagsSteamParamStringArray_t *

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

반환값: SteamAPICall_t to be used with a RemoteStorageEnumerateUserPublishedFilesResult_t call result.

EnumerateUserSubscribedFiles

SteamAPICall_t EnumerateUserSubscribedFiles( uint32 unStartIndex );
이름유형설명
unStartIndexuint32

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

반환값: SteamAPICall_t to be used with a RemoteStorageEnumerateUserSubscribedFilesResult_t call result.

FileDelete

bool FileDelete( const char *pchFile );
이름유형설명
pchFileconst char *The name of the file that will be deleted.

Deletes a file from the local disk, and propagates that delete to the cloud.

This is meant to be used when a user actively deletes a file. Use FileForget if you want to remove a file from the Steam Cloud but retain it on the users local disk.

When a file has been deleted it can be re-written with FileWrite to reupload it to the Steam Cloud.

반환값: bool
true if the file exists and has been successfully deleted; otherwise, false if the file did not exist.

FileExists

bool FileExists( const char *pchFile );
이름유형설명
pchFileconst char *The name of the file.

Checks whether the specified file exists.

반환값: bool
if the file exists; otherwise, false.

FileFetch

bool FileFetch( const char *pchFile );
이름유형설명
pchFileconst char *

Deprecated - PS3 Only.

반환값: bool

FileForget

bool FileForget( const char *pchFile );
이름유형설명
pchFileconst char *The name of the file that will be forgotten.

Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the API.

When you are out of Cloud space, this can be used to allow calls to FileWrite to keep working without needing to make the user delete files.

How you decide which files to forget are up to you. It could be a simple Least Recently Used (LRU) queue or something more complicated.

Requiring the user to manage their Cloud-ized files for a game, while is possible to do, it is never recommended. For instance, "Which file would you like to delete so that you may store this new one?" removes a significant advantage of using the Cloud in the first place: its transparency.

Once a file has been deleted or forgotten, calling FileWrite will resynchronize it in the Cloud. Rewriting a forgotten file is the only way to make it persisted again.

반환값: bool
true if the file exists and has been successfully forgotten; otherwise, false.

FilePersist

bool FilePersist( const char *pchFile );
이름유형설명
pchFileconst char *

Deprecated - PS3 Only.

반환값: bool

FilePersisted

bool FilePersisted( const char *pchFile );
이름유형설명
pchFileconst char *The name of the file.

Checks if a specific file is persisted in the steam cloud.

반환값: bool
? if the file exists and the file is persisted in the Steam Cloud.
false if FileForget was called on it and is only available locally.

FileRead

int32 FileRead( const char *pchFile, void *pvData, int32 cubDataToRead );
이름유형설명
pchFileconst char *The name of the file to read from.
pvDatavoid *The buffer that the file will be read into. This buffer must be at least the same size provided to cubDataToRead.
cubDataToReadint32The amount of bytes to read. Generally obtained from GetFileSize or GetFileTimestamp.

Opens a binary file, reads the contents of the file into a byte array, and then closes the file.

NOTE: This is a synchronous call and as such is a will block your calling thread on the disk IO, and will also block the SteamAPI, which can cause other threads in your application to block. To avoid "hitching" due to a busy disk on the client machine using FileReadAsync, the asynchronous version of this API is recommended.

반환값: int32
The number of bytes read.

Returns 0 if the file doesn't exist or the read fails.

FileReadAsync

SteamAPICall_t FileReadAsync( const char *pchFile, uint32 nOffset, uint32 cubToRead );
이름유형설명
pchFileconst char *The name of the file to read from.
nOffsetuint32The offset in bytes into the file where the read will start from. 0 if you're reading the whole file in one chunk.
cubToReaduint32The amount of bytes to read starting from nOffset.

Starts an asynchronous read from a file.

The offset and amount to read should be valid for the size of the file, as indicated by GetFileSize or GetFileTimestamp.

반환값: SteamAPICall_t to be used with a RemoteStorageFileReadAsyncComplete_t call result.
Returns k_uAPICallInvalid under the following conditions:
  • You tried to read from invalid path or filename. Because Steam Cloud is cross platform the files need to have valid names on all supported OSes and file systems. See Microsoft's documentation on Naming Files, Paths, and Namespaces.
  • The file doesn't exist.
  • cubDataToRead is <= 0 bytes. You need to be able to read something!
  • The combination of pvData and cubDataToRead would read past the end of the file.
  • You have an async read in progress on this file already.

Upon completion of the read request you will receive the call result, if the value of m_eResult within the call result is k_EResultOK you can then call FileReadAsyncComplete to read the requested data into your buffer. The hReadCall parameter should match the return value of this function, and the amount to read should generally be equal to the amount requested as indicated by m_nOffset and m_cubRead.

FileReadAsyncComplete

bool FileReadAsyncComplete( SteamAPICall_t hReadCall, void *pvBuffer, uint32 cubToRead );
이름유형설명
hReadCallSteamAPICall_tThe call result handle obtained from RemoteStorageFileReadAsyncComplete_t.
pvBuffervoid *The buffer that the file will be read into.
cubToReaduint32The number of bytes to copy. This should usually be the m_cubRead value from RemoteStorageFileReadAsyncComplete_t

Copies the bytes from a file which was asynchronously read with FileReadAsync into a byte array.

This should never be called outside of the context of a RemoteStorageFileReadAsyncComplete_t call result.

반환값: bool
true if the file was successfully read.

Otherwise, false under the following conditions:
  • The handle passed to hReadCall is invalid.
  • The read failed as indicated by m_eResult in RemoteStorageFileReadAsyncComplete_t, you shouldn't have called this.
  • The buffer provided to pvBuffer isn't big enough.

FileShare

SteamAPICall_t FileShare( const char *pchFile );
이름유형설명
pchFileconst char *

반환값: SteamAPICall_t to be used with a RemoteStorageFileShareResult_t call result.

FileWrite

bool FileWrite( const char *pchFile, const void *pvData, int32 cubData );
이름유형설명
pchFileconst char *The name of the file to write to.
pvDataconst void *The bytes to write to the file.
cubDataint32The number of bytes to write to the file. Typically the total size of pvData.

Creates a new file, writes the bytes to the file, and then closes the file. If the target file already exists, it is overwritten.

NOTE: This is a synchronous call and as such is a will block your calling thread on the disk IO, and will also block the SteamAPI, which can cause other threads in your application to block. To avoid "hitching" due to a busy disk on the client machine using FileWriteAsync, the asynchronous version of this API is recommended.

Returns: bool
true if the write was successful.

Otherwise, false under the following conditions:
  • The file you're trying to write is larger than 100MiB as defined by k_unMaxCloudFileChunkSize.
  • cubData is less than 0.
  • pvData is NULL.
  • You tried to write to an invalid path or filename. Because Steam Cloud is cross platform the files need to have valid names on all supported OSes and file systems. See Microsoft's documentation on Naming Files, Paths, and Namespaces.
  • The current user's Steam Cloud storage quota has been exceeded. They may have run out of space, or have too many files.
  • Steam could not write to the disk, the location might be read-only.

FileWriteAsync

SteamAPICall_t FileWriteAsync( const char *pchFile, const void *pvData, uint32 cubData );
이름유형설명
pchFileconst char *The name of the file to write to.
pvDataconst void *The bytes to write to the file.
cubDatauint32The number of bytes to write to the file. Typically the total size of pvData.

Creates a new file and asynchronously writes the raw byte data to the Steam Cloud, and then closes the file. If the target file already exists, it is overwritten.

Returns: SteamAPICall_t to be used with a RemoteStorageFileWriteAsyncComplete_t call result.
Returns k_uAPICallInvalid under the following conditions:
  • The file you're trying to write is larger than 100MiB as defined by k_unMaxCloudFileChunkSize.
  • cubData is less than 0.
  • pvData is NULL.
  • You tried to write to an invalid path or filename. Because Steam Cloud is cross platform the files need to have valid names on all supported OSes and file systems. See Microsoft's documentation on Naming Files, Paths, and Namespaces.
  • The current user's Steam Cloud storage quota has been exceeded. They may have run out of space, or have too many files.

FileWriteStreamCancel

bool FileWriteStreamCancel( UGCFileWriteStreamHandle_t writeHandle );
이름유형설명
writeHandleUGCFileWriteStreamHandle_tThe file write stream to cancel.

Cancels a file write stream that was started by FileWriteStreamOpen.

This trashes all of the data written and closes the write stream, but if there was an existing file with this name, it remains untouched.

반환값: bool

FileWriteStreamClose

bool FileWriteStreamClose( UGCFileWriteStreamHandle_t writeHandle );
이름유형설명
writeHandleUGCFileWriteStreamHandle_tThe file write stream to close.

Closes a file write stream that was started by FileWriteStreamOpen.

This flushes the stream to the disk, overwriting the existing file if there was one.

Returns: bool
true if the file write stream was successfully closed, the file has been committed to the disk.
false if writeHandle is not a valid file write stream.

FileWriteStreamOpen

UGCFileWriteStreamHandle_t FileWriteStreamOpen( const char *pchFile );
이름유형설명
pchFileconst char *The name of the file to write to.

Creates a new file output stream allowing you to stream out data to the Steam Cloud file in chunks. If the target file already exists, it is not overwritten until FileWriteStreamClose has been called.

To write data out to this stream you can use FileWriteStreamWriteChunk, and then to close or cancel you use FileWriteStreamClose and FileWriteStreamCancel respectively.

반환값: UGCFileWriteStreamHandle_t
Returns k_UGCFileStreamHandleInvalid under the following conditions:
  • You tried to write to an invalid path or filename. Because Steam Cloud is cross platform the files need to have valid names on all supported OSes and file systems. See Microsoft's documentation on Naming Files, Paths, and Namespaces.
  • The current user's Steam Cloud storage quota has been exceeded. They may have run out of space, or have too many files.

FileWriteStreamWriteChunk

bool FileWriteStreamWriteChunk( UGCFileWriteStreamHandle_t writeHandle, const void *pvData, int32 cubData );
이름유형설명
writeHandleUGCFileWriteStreamHandle_tThe file write stream to write to.
pvDataconst void *The data to write to the stream.
cubDataint32The size of pvData in bytes.

Writes a blob of data to the file write stream.

반환값: bool
true if the data was successfully written to the file write stream.
false if writeHandle is not a valid file write stream, cubData is negative or larger than k_unMaxCloudFileChunkSize, or the current user's Steam Cloud storage quota has been exceeded. They may have run out of space, or have too many files.

GetCachedUGCCount

int32 GetCachedUGCCount();

Returns: int32

GetCachedUGCHandle

UGCHandle_t GetCachedUGCHandle( int32 iCachedContent );
이름유형설명
iCachedContentint32

반환값: UGCHandle_t

GetFileCount

int32 GetFileCount();
Gets the total number of local files synchronized by Steam Cloud.

Used for enumeration with GetFileNameAndSize.

Returns: int32
The number of files present for the current user, including files in subfolders.

GetFileListFromServer

void GetFileListFromServer();
Deprecated - PS3 Only.

GetFileNameAndSize

const char * GetFileNameAndSize( int iFile, int32 *pnFileSizeInBytes );
이름유형설명
iFileintThe index of the file, this should be between 0 and GetFileCount.
pnFileSizeInBytesint32 *Returns the file size in bytes.

Gets the file name and size of a file from the index.

NOTE: You must call GetFileCount first to get the number of files.

반환값: const char *
The name of the file at the specified index, if it exists. Returns an empty string ("") if the file doesn't exist.

예시:
int32 fileCount = SteamRemoteStorage()->GetFileCount(); for ( int i = 0; i < fileCount; ++i ) { int32 fileSize; const char *fileName = SteamRemoteStorage()->GetFileNameAndSize( i, &fileSize ); // Do something with fileSize and fileName }

GetFileSize

int32 GetFileSize( const char *pchFile );
이름유형설명
pchFileconst char *The name of the file.

Gets the specified files size in bytes.

Returns: int32
The size of the file in bytes. Returns0 if the file does not exist.

GetFileTimestamp

int64 GetFileTimestamp( const char *pchFile );
이름유형설명
pchFileconst char *The name of the file.

Gets the specified file's last modified timestamp in Unix epoch format (seconds since Jan 1st 1970).

Returns: int64
The last modified timestamp in Unix epoch format (seconds since Jan 1st 1970).

GetLocalFileChangeCount

int32 GetLocalFileChangeCount( );

Note: only applies to applications flagged as supporting dynamic Steam Cloud sync.

When your application receives a RemoteStorageLocalFileChange_t, use this method to get the number of changes (file updates and file deletes) that have been made. You can then iterate the changes using GetLocalFileChange.

Returns: int32
The number of local file changes that have occurred.

GetLocalFileChange

const char *GetLocalFileChange( int iFile, ERemoteStorageLocalFileChange *pEChangeType, ERemoteStorageFilePathType *pEFilePathType );

Note: only applies to applications flagged as supporting dynamic Steam Cloud sync.

After calling GetLocalFileChangeCount, use this method to iterate over the changes. The changes described have already been made to local files. Your application should take appropriate action to reload state from disk, and possibly notify the user.

For example: The local system had been suspended, during which time the user played elsewhere and uploaded changes to the Steam Cloud. On resume, Steam downloads those changes to the local system before resuming the application. The application receives an RemoteStorageLocalFileChange_t, and uses GetLocalFileChangeCount and GetLocalFileChange to iterate those changes. Depending on the application structure and the nature of the changes, the application could:

  • Re-load game progress to resume at exactly the point where the user was when they exited the game on the other device
  • Notify the user of any synchronized changes that don't require reloading
  • etc


이름유형설명
iFileint32Zero-based index of the change
pEChangeTypeERemoteStorageLocalFileChangeWhat happened to this file
pEFilePathTypeERemoteStorageFilePathTypeType of path to the file returned

Returns: const char *
The file name or full path of the file affected by this change. See comments on pEFilePathType above for more detail.

GetPublishedFileDetails

SteamAPICall_t GetPublishedFileDetails( PublishedFileId_t unPublishedFileId, uint32 unMaxSecondsOld );
이름유형설명
unPublishedFileIdPublishedFileId_t
unMaxSecondsOlduint32

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: SteamAPICall_t to be used with a RemoteStorageGetPublishedFileDetailsResult_t call result.

GetPublishedItemVoteDetails

SteamAPICall_t GetPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId );
이름유형설명
unPublishedFileIdPublishedFileId_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: SteamAPICall_t to be used with a RemoteStorageGetPublishedItemVoteDetailsResult_t call result.

GetQuota

bool GetQuota( uint64 *pnTotalBytes, uint64 *puAvailableBytes );
이름유형설명
pnTotalBytesuint64 *Returns the total amount of bytes the user has access to.
puAvailableBytesuint64 *Returns the number of bytes available.

Gets the number of bytes available, and used on the users Steam Cloud storage.

Returns: bool
This function always returns true.

GetSyncPlatforms

ERemoteStoragePlatform GetSyncPlatforms( const char *pchFile );
이름유형설명
pchFileconst char *The name of the file.

Obtains the platforms that the specified file will syncronize to.

Returns: ERemoteStoragePlatform
Bitfield containing the platforms that the file was set to with SetSyncPlatforms.

GetUGCDetails

bool GetUGCDetails( UGCHandle_t hContent, AppId_t *pnAppID, char **ppchName, int32 *pnFileSizeInBytes, CSteamID *pSteamIDOwner );
이름유형설명
hContentUGCHandle_t
pnAppIDAppId_t *
ppchNamechar **
pnFileSizeInBytesint32 *
pSteamIDOwnerCSteamID *

Returns: bool

GetUGCDownloadProgress

bool GetUGCDownloadProgress( UGCHandle_t hContent, int32 *pnBytesDownloaded, int32 *pnBytesExpected );
이름유형설명
hContentUGCHandle_t
pnBytesDownloadedint32 *
pnBytesExpectedint32 *

Returns: bool

GetUserPublishedItemVoteDetails

SteamAPICall_t GetUserPublishedItemVoteDetails( PublishedFileId_t unPublishedFileId );
이름Type설명
unPublishedFileIdPublishedFileId_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: SteamAPICall_t to be used with a RemoteStorageGetPublishedItemVoteDetailsResult_t call result.

IsCloudEnabledForAccount

bool IsCloudEnabledForAccount();
Checks if the account wide Steam Cloud setting is enabled for this user; or if they disabled it in the Settings->Cloud dialog.

Ensure that you are also checking IsCloudEnabledForApp, as these two options are mutually exclusive.

Returns: bool
true if Steam Cloud is enabled for this account; otherwise, false.

IsCloudEnabledForApp

bool IsCloudEnabledForApp();
Checks if the per game Steam Cloud setting is enabled for this user; or if they disabled it in the Game Properties->Update dialog.

Ensure that you are also checking IsCloudEnabledForAccount, as these two options are mutually exclusive.

It's generally recommended that you allow the user to toggle this setting within your in-game options, you can toggle it with SetCloudEnabledForApp.

Returns: bool
true if Steam Cloud is enabled for this app; otherwise, false.

PublishVideo

SteamAPICall_t PublishVideo( EWorkshopVideoProvider eVideoProvider, const char *pchVideoAccount, const char *pchVideoIdentifier, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags );
이름Type설명
eVideoProviderEWorkshopVideoProvider
pchVideoAccountconst char *
pchVideoIdentifierconst char *
pchPreviewFileconst char *
nConsumerAppIdAppId_t
pchTitleconst char *
pchDescriptionconst char *
eVisibilityERemoteStoragePublishedFileVisibility
pTagsSteamParamStringArray_t *

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: SteamAPICall_t to be used with a RemoteStoragePublishFileProgress_t call result.

PublishWorkshopFile

SteamAPICall_t PublishWorkshopFile( const char *pchFile, const char *pchPreviewFile, AppId_t nConsumerAppId, const char *pchTitle, const char *pchDescription, ERemoteStoragePublishedFileVisibility eVisibility, SteamParamStringArray_t *pTags, EWorkshopFileType eWorkshopFileType );
이름Type설명
pchFileconst char *
pchPreviewFileconst char *
nConsumerAppIdAppId_t
pchTitleconst char *
pchDescriptionconst char *
eVisibilityERemoteStoragePublishedFileVisibility
pTagsSteamParamStringArray_t *
eWorkshopFileTypeEWorkshopFileType

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: SteamAPICall_t to be used with a RemoteStoragePublishFileProgress_t call result.

ResetFileRequestState

bool ResetFileRequestState();
Deprecated - PS3 Only.

Returns: bool

SetCloudEnabledForApp

void SetCloudEnabledForApp( bool bEnabled );
이름Type설명
bEnabledboolEnable (true) or disable (false) the Steam Cloud for this application?

Toggles whether the Steam Cloud is enabled for your application.

This setting can be queried with IsCloudEnabledForApp.

NOTE: This must only ever be called as the direct result of the user explicitly requesting that it's enabled or not. This is typically accomplished with a checkbox within your in-game options.

SetSyncPlatforms

bool SetSyncPlatforms( const char *pchFile, ERemoteStoragePlatform eRemoteStoragePlatform );
이름Type설명
pchFileconst char *The name of the file.
eRemoteStoragePlatformERemoteStoragePlatformThe platforms that the file will be syncronized to.

Allows you to specify which operating systems a file will be synchronized to.

Use this if you have a multiplatform game but have data which is incompatible between platforms.

Files default to k_ERemoteStoragePlatformAll when they are first created. You can use the bitwise OR operator, "|" to specify multiple platforms.

Returns: bool
true if the file exists, otherwise false.

SetUserPublishedFileAction

SteamAPICall_t SetUserPublishedFileAction( PublishedFileId_t unPublishedFileId, EWorkshopFileAction eAction );
이름Type설명
unPublishedFileIdPublishedFileId_t
eActionEWorkshopFileAction

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: SteamAPICall_t to be used with a RemoteStorageSetUserPublishedFileActionResult_t call result.

SubscribePublishedFile

SteamAPICall_t SubscribePublishedFile( PublishedFileId_t unPublishedFileId );
이름유형설명
unPublishedFileIdPublishedFileId_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: SteamAPICall_t to be used with a RemoteStorageSubscribePublishedFileResult_t call result.

UGCDownload

SteamAPICall_t UGCDownload( UGCHandle_t hContent, uint32 unPriority );
이름유형Description
hContentUGCHandle_t
unPriorityuint32

Returns: SteamAPICall_t to be used with a RemoteStorageDownloadUGCResult_t call result.

UGCDownloadToLocation

SteamAPICall_t UGCDownloadToLocation( UGCHandle_t hContent, const char *pchLocation, uint32 unPriority );
NameTypeDescription
hContentUGCHandle_t
pchLocationconst char *
unPriorityuint32

Returns: SteamAPICall_t to be used with a RemoteStorageDownloadUGCResult_t call result.

UGCRead

int32 UGCRead( UGCHandle_t hContent, void *pvData, int32 cubDataToRead, uint32 cOffset, EUGCReadAction eAction );
NameTypeDescription
hContentUGCHandle_t
pvDatavoid *
cubDataToReadint32
cOffsetuint32
eActionEUGCReadAction

Returns: int32

UnsubscribePublishedFile

SteamAPICall_t UnsubscribePublishedFile( PublishedFileId_t unPublishedFileId );
NameTypeDescription
unPublishedFileIdPublishedFileId_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: SteamAPICall_t to be used with a RemoteStorageUnsubscribePublishedFileResult_t call result.

UpdatePublishedFileDescription

bool UpdatePublishedFileDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchDescription );
NameTypeDescription
updateHandlePublishedFileUpdateHandle_t
pchDescriptionconst char *

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: bool

UpdatePublishedFileFile

bool UpdatePublishedFileFile( PublishedFileUpdateHandle_t updateHandle, const char *pchFile );
NameTypeDescription
updateHandlePublishedFileUpdateHandle_t
pchFileconst char *

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: bool

UpdatePublishedFilePreviewFile

bool UpdatePublishedFilePreviewFile( PublishedFileUpdateHandle_t updateHandle, const char *pchPreviewFile );
NameTypeDescription
updateHandlePublishedFileUpdateHandle_t
pchPreviewFileconst char *

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: bool

UpdatePublishedFileSetChangeDescription

bool UpdatePublishedFileSetChangeDescription( PublishedFileUpdateHandle_t updateHandle, const char *pchChangeDescription );
NameTypeDescription
updateHandlePublishedFileUpdateHandle_t
pchChangeDescriptionconst char *

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: bool

UpdatePublishedFileTags

bool UpdatePublishedFileTags( PublishedFileUpdateHandle_t updateHandle, SteamParamStringArray_t *pTags );
NameTypeDescription
updateHandlePublishedFileUpdateHandle_t
pTagsSteamParamStringArray_t *

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: bool

UpdatePublishedFileTitle

bool UpdatePublishedFileTitle( PublishedFileUpdateHandle_t updateHandle, const char *pchTitle );
NameTypeDescription
updateHandlePublishedFileUpdateHandle_t
pchTitleconst char *

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: bool

UpdatePublishedFileVisibility

bool UpdatePublishedFileVisibility( PublishedFileUpdateHandle_t updateHandle, ERemoteStoragePublishedFileVisibility eVisibility );
NameTypeDescription
updateHandlePublishedFileUpdateHandle_t
eVisibilityERemoteStoragePublishedFileVisibility

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: bool

UpdateUserPublishedItemVote

SteamAPICall_t UpdateUserPublishedItemVote( PublishedFileId_t unPublishedFileId, bool bVoteUp );
NameTypeDescription
unPublishedFileIdPublishedFileId_t
bVoteUpbool

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

Returns: SteamAPICall_t to be used with a RemoteStorageUpdateUserPublishedItemVoteResult_t call result.

콜백

These are callbacks which can be fired by calling SteamAPI_RunCallbacks. Many of these will be fired directly in response to the member functions of ISteamRemoteStorage.

RemoteStorageAppSyncedClient_t

Deprecated - PS3 only.

이름TypeDescription
m_nAppIDAppId_t
m_eResultEResult
m_unNumDownloadsint

RemoteStorageAppSyncedServer_t

Deprecated - PS3 only.

이름TypeDescription
m_nAppIDAppId_t
m_eResultEResult
m_unNumUploadsint

RemoteStorageAppSyncProgress_t

Deprecated - PS3 only.

이름TypeDescription
m_rgchCurrentFilechar[k_cchFilenameMaxCurrent file being transferred
m_nAppIDAppId_tApp this info relates to
m_uBytesTransferredThisChunkuint32Bytes transferred this chunk
m_dAppPercentCompletedoublePercent complete that this app's transfers are
m_bUploadingboolif false, downloading

RemoteStorageAppSyncStatusCheck_t

Deprecated - PS3 only.

이름TypeDescription
m_nAppIDAppId_t
m_eResultEResult

RemoteStorageDeletePublishedFileResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

이름TypeDescription
m_eResultEResultThe result of the operation.
m_nPublishedFileIdPublishedFileId_t

Associated Functions: DeletePublishedFile

RemoteStorageDownloadUGCResult_t


이름TypeDescription
m_eResultEResultThe result of the operation.
m_hFileUGCHandle_tThe handle to the file that was attempted to be downloaded.
m_nAppIDAppId_tID of the app that created this file.
m_nSizeInBytesint32The size of the file that was downloaded, in bytes.
m_pchFileNamechar[k_cchFilenameMaxThe name of the file that was downloaded.
m_ulSteamIDOwneruint64Steam ID of the user who created this content.

Associated Functions: UGCDownload, UGCDownloadToLocation

RemoteStorageEnumeratePublishedFilesByUserActionResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

이름TypeDescription
m_eResultEResultThe result of the operation.
m_eActionEWorkshopFileActionthe action that was filtered on
m_nResultsReturnedint32
m_nTotalResultCountint32
m_rgPublishedFileIdPublishedFileId_tk_unEnumeratePublishedFilesMaxResults
m_rgRTimeUpdateduint32k_unEnumeratePublishedFilesMaxResults

Associated Functions: EnumeratePublishedFilesByUserAction

RemoteStorageEnumerateUserPublishedFilesResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

이름TypeDescription
m_eResultEResultThe result of the operation.
m_nResultsReturnedint32
m_nTotalResultCountint32
m_rgPublishedFileIdPublishedFileId_tk_unEnumeratePublishedFilesMaxResults

Associated Functions: EnumerateUserPublishedFiles, EnumerateUserSharedWorkshopFiles

RemoteStorageEnumerateUserSharedWorkshopFilesResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

이름TypeDescription
m_eResultEResultThe result of the operation.
m_nResultsReturnedint32
m_nTotalResultCountint32
m_rgPublishedFileIdPublishedFileId_tk_unEnumeratePublishedFilesMaxResults

RemoteStorageEnumerateUserSubscribedFilesResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

이름TypeDescription
m_eResultEResultThe result of the operation.
m_nResultsReturnedint32
m_nTotalResultCountint32
m_rgPublishedFileIdPublishedFileId_tk_unEnumeratePublishedFilesMaxResults
m_rgRTimeSubscribeduint32k_unEnumeratePublishedFilesMaxResults

Associated Functions: EnumerateUserSubscribedFiles

RemoteStorageEnumerateWorkshopFilesResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

이름TypeDescription
m_eResultEResult
m_nResultsReturnedint32
m_nTotalResultCountint32
m_rgPublishedFileIdPublishedFileId_tk_unEnumeratePublishedFilesMaxResults
m_rgScorefloat[k_unEnumeratePublishedFilesMaxResults
m_nAppIdAppId_t
m_unStartIndexuint32

Associated Functions: EnumeratePublishedWorkshopFiles

RemoteStorageFileReadAsyncComplete_t

Response when reading a file asyncrounously with FileReadAsync.

NameTypeDescription
m_hFileReadAsyncSteamAPICall_tCall handle of the async read which was made, must be passed to FileReadAsyncComplete to get the data.
m_eResultEResultThe result of the operation.
If the local read was successful this will be k_EResultOK, you can then call FileReadAsyncComplete to get the data.
m_nOffsetuint32Offset into the file this read was at.
m_cubReaduint32Amount of bytes read - will be the <= the amount requested.

Associated Functions: FileReadAsync

RemoteStorageFileShareResult_t


NameTypeDescription
m_eResultEResultThe result of the operation
m_hFileUGCHandle_tThe handle that can be shared with users and features
m_rgchFilenamechar[k_cchFilenameMaxThe name of the file that was shared

Associated Functions: FileShare

RemoteStorageFileWriteAsyncComplete_t

Response when writing a file asyncrounously with FileWriteAsync.

NameTypeDescription
m_eResultEResultThe result of the operation.
If the local write was successful then this will be k_EResultOK - any other value likely indicates that the filename is invalid or the available quota would have been exceeded by the requested write. Any attempt to write files that exceed this size will return an EResult of k_EResultInvalidParam. Writing files to the cloud is limited to 100MiB.

Associated Functions: FileWriteAsync

RemoteStorageGetPublishedFileDetailsResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameTypeDescription
m_eResultEResultThe result of the operation.
m_nPublishedFileIdPublishedFileId_t
m_nCreatorAppIDAppId_tID of the app that created this file.
m_nConsumerAppIDAppId_tID of the app that will consume this file.
m_rgchTitlechar[k_cchPublishedDocumentTitleMaxtitle of document
m_rgchDescriptionchar[k_cchPublishedDocumentDescriptionMaxdescription of document
m_hFileUGCHandle_tThe handle of the primary file
m_hPreviewFileUGCHandle_tThe handle of the preview file
m_ulSteamIDOwneruint64Steam ID of the user who created this content.
m_rtimeCreateduint32time when the published file was created
m_rtimeUpdateduint32time when the published file was last updated
m_eVisibilityERemoteStoragePublishedFileVisibility
m_bBannedbool
m_rgchTagschar[k_cchTagListMaxcomma separated list of all tags associated with this file
m_bTagsTruncatedboolwhether the list of tags was too long to be returned in the provided buffer
m_pchFileNamechar[k_cchFilenameMaxThe name of the primary file
m_nFileSizeint32Size of the primary file
m_nPreviewFileSizeint32Size of the preview file
m_rgchURLchar[k_cchPublishedFileURLMaxURL (for a video or a website)
m_eFileTypeEWorkshopFileTypeType of the file
m_bAcceptedForUsebooldeveloper has specifically flagged this item as accepted in the Workshop

Associated Functions: GetPublishedFileDetails

RemoteStorageGetPublishedItemVoteDetailsResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameTypeDescription
m_eResultEResult
m_unPublishedFileIdPublishedFileId_t
m_nVotesForint32
m_nVotesAgainstint32
m_nReportsint32
m_fScorefloat

Associated Functions: GetPublishedItemVoteDetails, GetUserPublishedItemVoteDetails

RemoteStorageLocalFileChange_t

If a Steam app is flagged for supporting dynamic Steam Cloud sync, and a sync occurs, this callback will be posted to the app if any local files changed.

Associated Functions: GetLocalFileChangeCount, GetLocalFileChange

RemoteStoragePublishedFileDeleted_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameTypeDescription
m_nPublishedFileIdPublishedFileId_tThe published file id
m_nAppIDAppId_tID of the app that will consume this file.

RemoteStoragePublishedFileSubscribed_t


NameTypeDescription
m_nPublishedFileIdPublishedFileId_tThe published file id
m_nAppIDAppId_tID of the app that will consume this file.

RemoteStoragePublishedFileUnsubscribed_t


NameTypeDescription
m_nPublishedFileIdPublishedFileId_tThe published file id
m_nAppIDAppId_tID of the app that will consume this file.

RemoteStoragePublishedFileUpdated_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameTypeDescription
m_nPublishedFileIdPublishedFileId_tThe published file id
m_nAppIDAppId_tID of the app that will consume this file.
m_ulUnuseduint64not used anymore

RemoteStoragePublishFileProgress_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameTypeDescription
m_dPercentFiledouble
m_bPreviewbool

Associated Functions: PublishWorkshopFile, PublishVideo

RemoteStoragePublishFileResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameTypeDescription
m_eResultEResultThe result of the operation.
m_nPublishedFileIdPublishedFileId_t
m_bUserNeedsToAcceptWorkshopLegalAgreementbool

RemoteStorageSetUserPublishedFileActionResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameTypeDescription
m_eResultEResultThe result of the operation.
m_nPublishedFileIdPublishedFileId_tThe published file id
m_eActionEWorkshopFileActionthe action that was attempted

Associated Functions: SetUserPublishedFileAction

RemoteStorageSubscribePublishedFileResult_t

Called when the user has subscribed to a piece of UGC. Result from ISteamUGC::SubscribeItem.

NameTypeDescription
m_eResultEResultThe result of the operation.
m_nPublishedFileIdPublishedFileId_tThe workshop item that the user subscribed to.

Associated Functions: SubscribePublishedFile

RemoteStorageUnsubscribePublishedFileResult_t

Called when the user has unsubscribed from a piece of UGC. Result from ISteamUGC::UnsubscribeItem.

NameTypeDescription
m_eResultEResultThe result of the operation.
m_nPublishedFileIdPublishedFileId_tThe workshop item that the user unsubscribed from.

Associated Functions: UnsubscribePublishedFile

RemoteStorageUpdatePublishedFileResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameTypeDescription
m_eResultEResultThe result of the operation.
m_nPublishedFileIdPublishedFileId_t
m_bUserNeedsToAcceptWorkshopLegalAgreementbool

Associated Functions: CommitPublishedFileUpdate

RemoteStorageUpdateUserPublishedItemVoteResult_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameTypeDescription
m_eResultEResultThe result of the operation.
m_nPublishedFileIdPublishedFileId_tThe published file id

Associated Functions: UpdateUserPublishedItemVote

RemoteStorageUserVoteDetails_t

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameTypeDescription
m_eResultEResultThe result of the operation.
m_nPublishedFileIdPublishedFileId_tThe published file id
m_eVoteEWorkshopVotewhat the user voted

Structs

These are structs which functions in ISteamRemoteStorage may return and/or interact with.

SteamParamStringArray_t


NameTypeDescription
m_ppStringsconst char **Array of strings.
m_nNumStringsint32The number of strings that are in [param]m_ppStrings[/param].

열거형

These are enums which are defined for use with ISteamRemoteStorage.

ERemoteStorageLocalFileChange

Ways in which a local file may be changed by Steam during the application session. See GetLocalFileChange.

NameValueDescription
k_ERemoteStorageLocalFileChange_Invalid0Unused.
k_ERemoteStorageLocalFileChange_FileUpdated1The file contents changed.
k_ERemoteStorageLocalFileChange_FileDeleted2The file was deleted.

ERemoteStorageFilePathType

For APIs that may return file paths in different forms. See GetLocalFileChange.

NameValueDescription
k_ERemoteStorageFilePathType_Invalid0Unused.
k_ERemoteStorageFilePathType_Absolute1An absolute disk path is provided. This type of path is used for files managed via AutoCloud.
k_ERemoteStorageFilePathType_APIFilename2An ISteamRemoteStorage API relative path is provided. This type of path is used for files managed via the ISteamRemoteStorage API methods (FileWrite, FileRead, etc).

ERemoteStoragePlatform

Sync Platforms flags. These can be used with SetSyncPlatforms to restrict a file to a specific OS.

NameValueDescription
k_ERemoteStoragePlatformNone0This file will not be downloaded on any platform.
k_ERemoteStoragePlatformWindows(1 << 0)This file will download on Windows.
k_ERemoteStoragePlatformOSX(1 << 1)This file will download on macOS.
k_ERemoteStoragePlatformPS3(1 << 2)This file will download on the Playstation 3.
k_ERemoteStoragePlatformLinux(1 << 3)This file will download on SteamOS/Linux.
k_ERemoteStoragePlatformReserved2(1 << 4)Reserved.
k_ERemoteStoragePlatformAll0xffffffffThis file will download on every platform. This is the default.

ERemoteStoragePublishedFileVisibility

Possible visibility states that a Workshop item can be in.

NameValueDescription
k_ERemoteStoragePublishedFileVisibilityPublic0Visible to everyone.
k_ERemoteStoragePublishedFileVisibilityFriendsOnly1Visible to friends only.
k_ERemoteStoragePublishedFileVisibilityPrivate2Only visible to the creator. Setting an item to private is the closest that you can get to deleting a workshop item from the API.
k_ERemoteStoragePublishedFileVisibilityUnlisted3Visible to everyone, but will not be returned in any global queries.
Will also not be returned in any user lists unless the caller is the creator or a subscriber.

EUGCReadAction

Possible UGC Read Actions used with UGCRead.

NameValueDescription
k_EUGCRead_ContinueReadingUntilFinished0Keeps the file handle open unless the last byte is read. You can use this when reading large files (over 100MB) in sequential chunks.
If the last byte is read, this will behave the same as k_EUGCRead_Close. Otherwise, it behaves the same as k_EUGCRead_ContinueReading.
This value maintains the same behavior as before the EUGCReadAction parameter was introduced.
k_EUGCRead_ContinueReading1Keeps the file handle open. Use this when using UGCRead to seek to different parts of the file.
When you are done seeking around the file, make a final call with k_EUGCRead_Close to close it.
k_EUGCRead_Close2Frees the file handle. Use this when you're done reading the content.
To read the file from Steam again you will need to call UGCDownload again.

EWorkshopEnumerationType

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameValueDescription
k_EWorkshopEnumerationTypeRankedByVote0
k_EWorkshopEnumerationTypeRecent1
k_EWorkshopEnumerationTypeTrending2
k_EWorkshopEnumerationTypeFavoritesOfFriends3
k_EWorkshopEnumerationTypeVotedByFriends4
k_EWorkshopEnumerationTypeContentByFriends5
k_EWorkshopEnumerationTypeRecentFromFollowedUsers6

EWorkshopFileAction

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameValueDescription
k_EWorkshopFileActionPlayed0The user has played with or on this item. (e.g. Loaded a weapon or level.)
k_EWorkshopFileActionCompleted1The user has completed this item. (e.g. Got to the end of a linear map.)

EWorkshopFileType

The way that a shared file will be shared with the community.

NameValueDescription
k_EWorkshopFileTypeFirst0Only used for enumerating.
k_EWorkshopFileTypeCommunity0Normal Workshop item that can be subscribed to.
k_EWorkshopFileTypeMicrotransaction1Workshop item that is meant to be voted on for the purpose of selling in-game. (See: Curated Workshop)
k_EWorkshopFileTypeCollection2A collection of Workshop items.
k_EWorkshopFileTypeArt3Artwork.
k_EWorkshopFileTypeVideo4External video.
k_EWorkshopFileTypeScreenshot5Screenshot.
k_EWorkshopFileTypeGame6Unused, used to be for Greenlight game entries
k_EWorkshopFileTypeSoftware7Unused, used to be for Greenlight software entries.
k_EWorkshopFileTypeConcept8Unused, used to be for Greenlight concepts.
k_EWorkshopFileTypeWebGuide9Steam web guide.
k_EWorkshopFileTypeIntegratedGuide10Application integrated guide.
k_EWorkshopFileTypeMerch11Workshop merchandise meant to be voted on for the purpose of being sold.
k_EWorkshopFileTypeControllerBinding12Steam Controller bindings.
k_EWorkshopFileTypeSteamworksAccessInvite13Only used internally in Steam.
k_EWorkshopFileTypeSteamVideo14Steam video.
k_EWorkshopFileTypeGameManagedItem15Managed completely by the game, not the user, and not shown on the web.
k_EWorkshopFileTypeMax16Only used for enumerating.

EWorkshopVideoProvider

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameValueDescription
k_EWorkshopVideoProviderNone0The item has no video.
k_EWorkshopVideoProviderYoutube1The item has a Youtube video.

EWorkshopVote

Deprecated - Only used with the deprecated RemoteStorage based Workshop API.

NameValueDescription
k_EWorkshopVoteUnvoted0The user has not voted.
k_EWorkshopVoteFor1The user has voted this item up.
k_EWorkshopVoteAgainst2The user has voted this item down.
k_EWorkshopVoteLater3The user has chosen to vote later.

Typedefs

These are typedefs which are defined for use with ISteamRemoteStorage.

NameBase typeDescription
PublishedFileId_tuint64A unique handle to an individual workshop item.
PublishedFileUpdateHandle_tuint64Deprecated - Only used with the deprecated RemoteStorage based Workshop API.
UGCFileWriteStreamHandle_tuint64Handle used when asynchronously writing to Steam Cloud.
UGCHandle_tuint64A unique handle to a piece of user generated content.

Constants

These are constants which are defined for use with ISteamRemoteStorage.

NameTypeValueDescription
k_cchFilenameMaxuint32260The maximum length that a Steam Cloud file path can be.
k_cchPublishedDocumentChangeDescriptionMaxuint328000Unused.
k_cchPublishedDocumentDescriptionMaxuint328000The maximum size in bytes that a Workshop item description can be.
k_cchPublishedDocumentTitleMaxuint32128 + 1The maximum size in bytes that a Workshop item title can be.
k_cchPublishedFileURLMaxuint32256The maximum size in bytes that a Workshop item URL can be.
k_cchTagListMaxuint321024 + 1The maximum size in bytes that a Workshop item comma separated tag list can be.
k_PublishedFileIdInvalidPublishedFileId_t0An invalid Workshop item handle.
k_PublishedFileUpdateHandleInvalidPublishedFileUpdateHandle_t0xffffffffffffffffullDeprecated - Only used with the deprecated RemoteStorage based Workshop API.
k_UGCFileStreamHandleInvalidUGCFileWriteStreamHandle_t0xffffffffffffffffullReturned when an error has occured when using FileWriteStreamOpen.
k_UGCHandleInvalidUGCHandle_t0xffffffffffffffffullAn invalid UGC Handle. This is often returned by functions signifying an error.
k_unEnumeratePublishedFilesMaxResultsuint3250Deprecated - Only used with the deprecated RemoteStorage based Workshop API.
k_unMaxCloudFileChunkSizeuint32100 * 1024 * 1024Defines the largest allowed file size for the Steam Cloud.
Cloud files cannot be written in a single chunk over 100MiB and cannot be over 200MiB total.
STEAMREMOTESTORAGE_INTERFACE_VERSIONconst char *"STEAMREMOTESTORAGE_INTERFACE_VERSION014"