[−][src]Struct cloud_storage_sync::Sync
Methods
impl Sync
[src]
pub fn new(force_overwrite: bool) -> Self
[src]
Creates new Sync instance
Arguments:
force_overwrite
: Don't do size and checksum comparison, just overwrite everthing
pub fn sync_gcs_to_local(
&self,
bucket_src: &str,
path_src: &str,
path_dst: impl AsRef<Path>
) -> Result<(), Error>
[src]
&self,
bucket_src: &str,
path_src: &str,
path_dst: impl AsRef<Path>
) -> Result<(), Error>
Syncs remote GCS bucket path to a local path
pub fn sync_local_to_gcs(
&self,
path_src: impl AsRef<Path>,
bucket_dst: &str,
path_dst: &str
) -> Result<(), Error>
[src]
&self,
path_src: impl AsRef<Path>,
bucket_dst: &str,
path_dst: &str
) -> Result<(), Error>
Syncs local file or directory to GCS bucket if path_src is a file then the resulting object will be [bucket_dst]/[path_dst]/[filename] where [filename] is a string after the last "/" of the path_src
pub fn copy_gcs_to_gcs(
bucket_src: &str,
path_src: &str,
bucket_dst: &str,
path_dst: &str
) -> Result<(), Error>
[src]
bucket_src: &str,
path_src: &str,
bucket_dst: &str,
path_dst: &str
) -> Result<(), Error>
Copies remote GCS bucket file or directory to another remote GCS bucket file or directory
pub fn sync_local_dir_to_gcs(
&self,
path_src: impl AsRef<Path>,
bucket: &str,
path_dst: &str
) -> Result<(), Error>
[src]
&self,
path_src: impl AsRef<Path>,
bucket: &str,
path_dst: &str
) -> Result<(), Error>
Syncs local directory to gcs bucket the resulting filenames will be [path_dst]/[filename] where [filename] is path relative to the path_src
pub fn sync_local_file_to_gcs(
&self,
path_src: impl AsRef<Path>,
bucket: &str,
filename: &str
) -> Result<(), Error>
[src]
&self,
path_src: impl AsRef<Path>,
bucket: &str,
filename: &str
) -> Result<(), Error>
Syncs local file and remote object
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Sync
impl Send for Sync
impl Sync for Sync
impl Unpin for Sync
impl UnwindSafe for Sync
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,